/* ============================================
   LIVE STATS SHOWCASE - AAA Glassmorphism
   Mobile-First Design with Particles & Animations
   ============================================ */

/* Container */
.activity-ticker-container {
    position: relative;
    z-index: 10;
    background: linear-gradient(180deg,
        rgba(5, 8, 5, 0.98) 0%,
        rgba(5, 8, 5, 0.95) 100%
    );
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(34, 197, 94, 0.2);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
    padding: 12px 16px;
    margin: 0;
    overflow: hidden;
}

/* Header */
.activity-ticker-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    gap: 12px;
}

.activity-ticker-title {
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    display: flex;
    align-items: center;
    gap: 8px;
    text-shadow: 0 2px 8px rgba(34, 197, 94, 0.5);
}

.activity-ticker-view-all {
    background: linear-gradient(135deg,
        rgba(34, 197, 94, 0.15) 0%,
        rgba(16, 185, 129, 0.1) 100%
    );
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(34, 197, 94, 0.3);
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 11px;
    font-weight: 700;
    color: #22c55e;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(34, 197, 94, 0.2);
}

.activity-ticker-view-all:hover {
    background: linear-gradient(135deg,
        rgba(34, 197, 94, 0.25) 0%,
        rgba(16, 185, 129, 0.15) 100%
    );
    border-color: rgba(34, 197, 94, 0.5);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
}

/* Stats Grid - Mobile First - FORCE GRID LAYOUT */
.activity-ticker-container .activity-ticker-scroll,
.activity-ticker-container .stats-showcase-grid,
div.activity-ticker-scroll.stats-showcase-grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 8px !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: hidden !important;
    position: relative !important;
}

/* Tablet & Desktop */
@media (min-width: 640px) {
    .activity-ticker-container .stats-showcase-grid,
    .activity-ticker-container .activity-ticker-scroll,
    div.activity-ticker-scroll.stats-showcase-grid {
        gap: 16px !important;
    }
}

/* Stat Card - Base - SCOPED to ticker only */
.activity-ticker-container .stat-card {
    position: relative;
    min-height: 180px;
    max-width: 100%;
    width: 100%;
    padding: 20px;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s ease-out;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    box-sizing: border-box;

    /* AAA Glassmorphism (no backdrop-filter, parent has it) */
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);

    /* Animation - no overshoot */
    animation: slideUp 0.4s ease-out;

    /* 🚀 Performance: CSS containment */
    contain: layout style paint;
    will-change: transform;
}

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

.activity-ticker-container .stat-card:hover {
    transform: translateY(-4px);
    box-shadow:
        0 12px 36px rgba(0, 0, 0, 0.5),
        inset 0 1px 2px rgba(255, 255, 255, 0.2);
}

.activity-ticker-container .stat-card:active {
    transform: translateY(-2px);
}

/* === BIGGEST WIN CARD === */
.activity-ticker-container .stat-card--biggest {
    background: linear-gradient(135deg,
        rgba(182, 75, 243, 0.2) 0%,
        rgba(255, 215, 0, 0.15) 100%
    );
    border-color: rgba(255, 215, 0, 0.4);
    animation: slideUp 0.4s ease-out,
               pulseDiamond 3s ease-in-out infinite;
}

@keyframes pulseDiamond {
    0%, 100% {
        box-shadow:
            0 8px 32px rgba(255, 215, 0, 0.3),
            0 0 30px rgba(182, 75, 243, 0.2),
            inset 0 1px 0 rgba(255, 255, 255, 0.2);
    }
    50% {
        box-shadow:
            0 8px 40px rgba(255, 215, 0, 0.5),
            0 0 50px rgba(182, 75, 243, 0.4),
            inset 0 1px 2px rgba(255, 255, 255, 0.3);
    }
}

.activity-ticker-container .stat-card--biggest .stat-icon {
    font-size: 48px;
    animation: float 3s ease-in-out infinite;
    filter: drop-shadow(0 4px 12px rgba(255, 215, 0, 0.6));
}

@keyframes float {
    0%, 100% { transform: translateY(0px) scale(1); }
    50% { transform: translateY(-8px) scale(1.05); }
}

.activity-ticker-container .stat-card--biggest .stat-amount {
    font-size: 28px;
    font-weight: 800;
    background: linear-gradient(135deg, #ffd700, #b64bf3);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 2px 12px rgba(255, 215, 0, 0.5);
    margin: 8px 0;
}

/* === HIGHEST ODDS CARD === */
.activity-ticker-container .stat-card--odds {
    background: linear-gradient(135deg,
        rgba(14, 165, 233, 0.2) 0%,
        rgba(6, 182, 212, 0.12) 100%
    );
    border-color: rgba(6, 182, 212, 0.5);
    animation: slideUp 0.4s ease-out 0.1s backwards,
               pulseCyan 3s ease-in-out infinite;
}

@keyframes pulseCyan {
    0%, 100% {
        box-shadow:
            0 8px 32px rgba(6, 182, 212, 0.3),
            0 0 30px rgba(14, 165, 233, 0.2),
            inset 0 1px 0 rgba(255, 255, 255, 0.2);
    }
    50% {
        box-shadow:
            0 8px 40px rgba(6, 182, 212, 0.5),
            0 0 50px rgba(14, 165, 233, 0.4),
            inset 0 1px 2px rgba(255, 255, 255, 0.3);
    }
}

.activity-ticker-container .stat-card--odds .stat-icon {
    font-size: 48px;
    animation: spin 4s linear infinite;
    filter: drop-shadow(0 4px 12px rgba(6, 182, 212, 0.6));
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.activity-ticker-container .stat-card--odds .stat-multiplier {
    font-size: 32px;
    font-weight: 800;
    background: linear-gradient(135deg, #06b6d4, #0ea5e9);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 2px 12px rgba(6, 182, 212, 0.5);
    margin: 8px 0;
}

/* === HOT GAME CARD === */
.activity-ticker-container .stat-card--hot {
    background: linear-gradient(135deg,
        rgba(249, 115, 22, 0.2) 0%,
        rgba(239, 68, 68, 0.12) 100%
    );
    border-color: rgba(239, 68, 68, 0.5);
    animation: slideUp 0.4s ease-out 0.2s backwards,
               pulseOrange 3s ease-in-out infinite;
}

@keyframes pulseOrange {
    0%, 100% {
        box-shadow:
            0 8px 32px rgba(239, 68, 68, 0.3),
            0 0 30px rgba(249, 115, 22, 0.2),
            inset 0 1px 0 rgba(255, 255, 255, 0.2);
    }
    50% {
        box-shadow:
            0 8px 40px rgba(239, 68, 68, 0.5),
            0 0 50px rgba(249, 115, 22, 0.4),
            inset 0 1px 2px rgba(255, 255, 255, 0.3);
    }
}

.activity-ticker-container .stat-card--hot .stat-icon {
    font-size: 48px;
    animation: flicker 2s ease-in-out infinite;
    filter: drop-shadow(0 4px 12px rgba(239, 68, 68, 0.6));
}

@keyframes flicker {
    0%, 100% { opacity: 1; transform: scale(1); }
    25% { opacity: 0.9; transform: scale(1.05); }
    50% { opacity: 1; transform: scale(1); }
    75% { opacity: 0.95; transform: scale(1.02); }
}

/* === CARD CONTENT === */
.activity-ticker-container .stat-title {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: rgba(255, 255, 255, 0.9);
    margin: 8px 0;
}

.activity-ticker-container .stat-divider {
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.5) 50%,
        transparent 100%
    );
    margin: 12px 0;
}

.activity-ticker-container .stat-user,
.activity-ticker-container .stat-game,
.activity-ticker-container .stat-game-name {
    font-size: 12px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.85);
    margin: 4px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.activity-ticker-container .stat-wins,
.activity-ticker-container .stat-total,
.activity-ticker-container .stat-win {
    font-size: 14px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.9);
    margin: 4px 0;
}

.activity-ticker-container .stat-time {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 8px;
}

.activity-ticker-container .stat-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    font-size: 8px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 4px 8px;
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(8px);
    color: #fff;
}

.activity-ticker-container .stat-card--biggest .stat-badge {
    background: rgba(255, 215, 0, 0.2);
    border-color: rgba(255, 215, 0, 0.5);
    color: #ffd700;
}

.activity-ticker-container .stat-card--odds .stat-badge {
    background: rgba(6, 182, 212, 0.2);
    border-color: rgba(6, 182, 212, 0.5);
    color: #06b6d4;
}

.activity-ticker-container .stat-card--hot .stat-badge {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.5);
    color: #ef4444;
}

/* === PARTICLES === */
.activity-ticker-container .stat-particles {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    opacity: 0.6;
}

.activity-ticker-container .stat-card--biggest .stat-particles::before,
.activity-ticker-container .stat-card--biggest .stat-particles::after {
    content: '✨';
    position: absolute;
    font-size: 16px;
    animation: sparkleFloat 4s ease-in-out infinite;
}

.activity-ticker-container .stat-card--biggest .stat-particles::before {
    top: 20%;
    left: 15%;
    animation-delay: 0s;
}

.activity-ticker-container .stat-card--biggest .stat-particles::after {
    top: 60%;
    right: 15%;
    animation-delay: 2s;
}

@keyframes sparkleFloat {
    0%, 100% {
        opacity: 0;
        transform: translateY(0) scale(0.5) rotate(0deg);
    }
    50% {
        opacity: 1;
        transform: translateY(-20px) scale(1) rotate(180deg);
    }
}

.activity-ticker-container .stat-card--odds .stat-particles::before {
    content: '⚡';
    position: absolute;
    top: 30%;
    left: 10%;
    font-size: 20px;
    animation: zap 3s ease-in-out infinite;
}

@keyframes zap {
    0%, 100% { opacity: 0; transform: scale(0) rotate(0deg); }
    10% { opacity: 1; transform: scale(1.2) rotate(15deg); }
    20%, 80% { opacity: 0.8; transform: scale(1) rotate(0deg); }
    90% { opacity: 1; transform: scale(1.2) rotate(-15deg); }
}

.activity-ticker-container .stat-card--hot .stat-particles::before,
.activity-ticker-container .stat-card--hot .stat-particles::after {
    content: '🔥';
    position: absolute;
    font-size: 14px;
    animation: rise 3s ease-out infinite;
}

.activity-ticker-container .stat-card--hot .stat-particles::before {
    bottom: 10%;
    left: 20%;
    animation-delay: 0s;
}

.activity-ticker-container .stat-card--hot .stat-particles::after {
    bottom: 10%;
    right: 20%;
    animation-delay: 1.5s;
}

@keyframes rise {
    0% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    100% {
        opacity: 0;
        transform: translateY(-80px) scale(0.5);
    }
}

/* === EMPTY STATE === */
.activity-ticker-container .stat-card--empty,
.activity-ticker-container .stat-card--empty-state {
    background: linear-gradient(135deg,
        rgba(255, 255, 255, 0.05) 0%,
        rgba(255, 255, 255, 0.02) 100%
    );
    border-color: rgba(255, 255, 255, 0.1);
    cursor: default;
    animation: none;
}

.activity-ticker-container .stat-card--empty:hover,
.activity-ticker-container .stat-card--empty-state:hover {
    transform: none;
}

.activity-ticker-container .stat-empty {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 12px;
}

/* === LOADING STATE === */
.activity-ticker-container .stat-card--loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: linear-gradient(135deg,
        rgba(255, 255, 255, 0.05) 0%,
        rgba(255, 255, 255, 0.02) 100%
    );
    color: rgba(255, 255, 255, 0.5);
    font-size: 12px;
}

.loading-shimmer {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(34, 197, 94, 0.2);
    border-top-color: rgba(34, 197, 94, 0.8);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* === MOBILE OPTIMIZATIONS === */
@media (max-width: 640px) {
    .activity-ticker-container {
        padding: 10px 12px;
    }

    .activity-ticker-container .stat-card {
        min-height: 160px;
        padding: 16px;
    }

    .activity-ticker-container .stat-icon {
        font-size: 40px !important;
    }

    .activity-ticker-container .stat-amount {
        font-size: 24px !important;
    }

    .activity-ticker-container .stat-multiplier {
        font-size: 26px !important;
    }

    /* 🚀 CRITICAL: Disable ALL animations on mobile */
    .activity-ticker-container .stat-card--biggest,
    .activity-ticker-container .stat-card--odds,
    .activity-ticker-container .stat-card--hot {
        animation: slideUp 0.4s ease-out !important; /* Keep only entrance */
    }

    .activity-ticker-container .stat-icon {
        animation: none !important; /* Disable float/spin/flicker */
    }

    .activity-ticker-container .stat-particles::before,
    .activity-ticker-container .stat-particles::after {
        display: none !important; /* Remove emoji particles */
    }

    .activity-ticker-container .stat-card:hover {
        transform: none !important; /* No hover lift */
    }

    /* 🚀 CRITICAL: Remove backdrop-filter (mobile killer) */
    .activity-ticker-container {
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        background: rgba(5, 8, 5, 0.95) !important;
    }

    .activity-ticker-view-all {
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        background: rgba(34, 197, 94, 0.15) !important;
    }

    .activity-ticker-container .stat-badge {
        backdrop-filter: none !important;
        background: rgba(0, 0, 0, 0.6) !important;
    }
}

/* === TABLET === */
@media (min-width: 640px) and (max-width: 1024px) {
    .activity-ticker-container .stat-card {
        min-height: 200px;
    }
}

/* === DESKTOP - Enhanced effects === */
@media (min-width: 1024px) {
    .activity-ticker-container .stat-card {
        min-height: 220px;
    }

    .activity-ticker-container .stat-card:hover {
        transform: translateY(-6px);
    }
}

/* === REDUCED MOTION === */
@media (prefers-reduced-motion: reduce) {
    .activity-ticker-container .stat-card,
    .activity-ticker-container .stat-card--biggest,
    .activity-ticker-container .stat-card--odds,
    .activity-ticker-container .stat-card--hot,
    .activity-ticker-container .stat-icon,
    .activity-ticker-container .stat-particles::before,
    .activity-ticker-container .stat-particles::after {
        animation: none !important;
    }

    .activity-ticker-container .stat-card:hover {
        transform: none;
    }
}

/* === TOUCH DEVICES === */
@media (hover: none) and (pointer: coarse) {
    .activity-ticker-container .stat-card:hover {
        transform: none;
    }

    .activity-ticker-container .stat-card:active {
        transform: scale(0.95);
        opacity: 0.9;
    }
}

/* === DARK MODE SUPPORT === */
@media (prefers-color-scheme: light) {
    .activity-ticker-container {
        background: linear-gradient(180deg,
            rgba(255, 255, 255, 0.95) 0%,
            rgba(255, 255, 255, 0.9) 100%
        );
        border-bottom-color: rgba(34, 197, 94, 0.3);
    }

    .activity-ticker-container .stat-title,
    .activity-ticker-container .stat-user,
    .activity-ticker-container .stat-game {
        color: rgba(0, 0, 0, 0.8);
    }
}

/* ============================================
   🚀 AGGRESSIVE SCROLL PERFORMANCE (768px)
   ============================================
   Extended mobile optimization for all phones/tablets
   Targets the main scroll killers
   ============================================ */

@media (max-width: 768px) {
    /* 🔥 REMOVE ALL BACKDROP FILTERS */
    .activity-ticker-container,
    .activity-ticker-container *,
    .activity-ticker-view-all,
    .activity-ticker-container .stat-badge {
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
    }

    /* 🔥 SOLID BACKGROUNDS (no blur needed) */
    .activity-ticker-container {
        background: rgba(5, 8, 5, 0.98) !important;
    }

    .activity-ticker-view-all {
        background: rgba(34, 197, 94, 0.2) !important;
    }

    .activity-ticker-container .stat-badge {
        background: rgba(0, 0, 0, 0.7) !important;
    }

    /* 🔥 DISABLE ALL PULSE/GLOW ANIMATIONS - Main scroll killer! */
    .activity-ticker-container .stat-card--biggest,
    .activity-ticker-container .stat-card--odds,
    .activity-ticker-container .stat-card--hot {
        animation: none !important;
    }

    /* 🔥 STATIC BOX SHADOWS (no animation) */
    .activity-ticker-container .stat-card--biggest {
        box-shadow: 0 4px 16px rgba(255, 215, 0, 0.25) !important;
    }

    .activity-ticker-container .stat-card--odds {
        box-shadow: 0 4px 16px rgba(6, 182, 212, 0.25) !important;
    }

    .activity-ticker-container .stat-card--hot {
        box-shadow: 0 4px 16px rgba(239, 68, 68, 0.25) !important;
    }

    /* 🔥 DISABLE ICON ANIMATIONS */
    .activity-ticker-container .stat-card--biggest .stat-icon,
    .activity-ticker-container .stat-card--odds .stat-icon,
    .activity-ticker-container .stat-card--hot .stat-icon {
        animation: none !important;
        filter: drop-shadow(0 2px 6px currentColor) !important;
    }

    /* 🔥 HIDE PARTICLES COMPLETELY */
    .activity-ticker-container .stat-particles {
        display: none !important;
    }

    /* 🔥 REMOVE will-change (saves GPU memory) */
    .activity-ticker-container .stat-card {
        will-change: auto !important;
        contain: layout style !important; /* Keep containment but remove paint */
    }

    /* 🔥 DISABLE HOVER TRANSFORMS */
    .activity-ticker-container .stat-card:hover {
        transform: none !important;
        box-shadow: inherit !important;
    }

    /* 🔥 SIMPLIFY VIEW-ALL BUTTON */
    .activity-ticker-view-all {
        transition: none !important;
    }

    .activity-ticker-view-all:hover {
        transform: none !important;
    }

    /* 🔥 ENSURE SMOOTH SCROLLING IN PARENT */
    .activity-ticker-container {
        contain: layout style !important;
    }
}
