::-webkit-scrollbar {
            width: 14px;
            background-color: #1f2937;
        }
        ::-webkit-scrollbar-thumb {
            background-color: #7c3aed;
            border-radius: 7px;
            border: 3px solid #1f2937;
        }
        ::-webkit-scrollbar-thumb:hover {
            background-color: #8b5cf6;
        }
        .gradient-bg {
            background: linear-gradient(-45deg, #4f46e5, #7c3aed, #2563eb, #3b82f6);
            background-size: 400% 400%;
            animation: gradient 15s ease infinite;
        }
        @keyframes gradient {
            0% { background-position: 0% 50%; }
            50% { background-position: 100% 50%; }
            100% { background-position: 0% 50%; }
        }
        
        /* Fix for the overlapping text in impressions stats */
.impressions-stats {
    grid-column: span 2;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    border: 1px solid rgba(107, 114, 128, 0.3);
    transition: all 0.2s ease;
}

.impressions-stats > div:first-child {
    border-bottom: 1px solid rgba(75, 85, 99, 0.3);
    padding-bottom: 0.25rem;
    margin-bottom: 0.25rem;
}

/* This is the key fix - add proper structure for the metrics display */
.impressions-stats .metrics-row {
    display: flex;
    justify-content: space-between;
}

.impressions-stats .metric-item {
    text-align: left;
    width: 33%;
}

/* Style for the CPM value */
.impressions-cpm {
    color: #10B981;
    font-weight: bold;
}

.impressions-stats:hover {
  border-color: rgba(139, 92, 246, 0.5);
  box-shadow: 0 0 8px rgba(139, 92, 246, 0.2);
}

.impressions-stats .value-updated {
  animation: highlight-update 1.5s ease;
}

/* Make the Page Ads header more prominent */
.impressions-stats .text-gray-400.text-xs.font-semibold {
  color: rgba(161, 161, 170, 0.9);
  letter-spacing: 0.02em;
  border-bottom: 1px solid rgba(107, 114, 128, 0.2);
  padding-bottom: 4px;
  margin-bottom: 6px;
}

    
    /* For animation when stats update */
    @keyframes highlight-update {
        0% { background-color: rgba(124, 58, 237, 0.2); }
        100% { background-color: transparent; }
    }
    
    .stat-highlight {
        animation: highlight-update 1.5s ease-out;
    }
        
        .rank-tag.bg-red-800 {
    background-color: #991b1b;
    color: white;
    font-weight: bold;
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    display: inline-block;
}

/* Admin username color */
.text-red-500 {
    color: #ef4444;
}

    .session-warning {
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        background-color: rgba(0, 0, 0, 0.9);
        padding: 2rem;
        border-radius: 0.5rem;
        z-index: 1000;
        text-align: center;
    }
    
    .chart-container {
            height: 250px;
        }
        
        .profile-modal {
            position: fixed;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            background-color: rgba(31, 41, 55, 0.95);
            border-radius: 0.75rem;
            padding: 2rem;
            max-width: 400px;
            width: 90%;
            z-index: 1000;
            box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
        }
        
        .stats-share-modal {
            position: fixed;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            background-color: rgba(31, 41, 55, 0.95);
            border-radius: 0.75rem;
            padding: 2rem;
            max-width: 300px;
            width: 90%;
            z-index: 1000;
        }
        
.rank-scout {
    color: #e5e7eb; 
}

.rank-apprentice {
    color: #60a5fa; 
    font-weight: 600;
}

.rank-agent {
    color: #818cf8; 
    font-weight: 600;
    text-shadow: 0 0 8px rgba(129, 140, 248, 0.8);
}

.rank-veteran {
    color: #c084fc; 
    font-weight: 600;
    text-shadow: 0 0 8px rgba(192, 132, 252, 0.8);
    position: relative;
    animation: rankPulse 2s ease-in-out infinite;
}

.rank-specialist {
    color: #f472b6; 
    font-weight: 600;
    text-shadow: 0 0 8px rgba(244, 114, 182, 0.8);
    position: relative;
    animation: rankPulse 2s ease-in-out infinite;
}

.rank-commander {
    color: #fb7185; 
    font-weight: 600;
    text-shadow: 0 0 10px rgba(251, 113, 133, 0.9);
    position: relative;
    animation: rankPulse 2s ease-in-out infinite;
}

.rank-sentinel {
    color: #fcd34d;
    font-weight: 600;
    text-shadow: 0 0 10px rgba(252, 211, 77, 0.9);
    position: relative;
    animation: rankGlow 2s ease-in-out infinite;
}

.rank-grandmaster {
    color: #fbbf24; 
    font-weight: 600;
    text-shadow: 0 0 12px rgba(251, 191, 36, 0.9);
    position: relative;
    animation: rankGlow 2s ease-in-out infinite;
}

.rank-champion {
    color: #f59e0b; 
    font-weight: 700;
    text-shadow: 0 0 12px rgba(245, 158, 11, 0.9);
    position: relative;
    animation: rankGlow 2s ease-in-out infinite;
}

.rank-sigma {
    background: linear-gradient(90deg, #f59e0b, #d97706, #f59e0b);
    background-size: 200% auto;
    color: transparent;
    -webkit-background-clip: text;
    background-clip: text;
    font-weight: 700;
    animation: rankShine 3s linear infinite;
}

.rank-overlord {
    background: linear-gradient(90deg, #ef4444, #b91c1c, #ef4444);
    background-size: 200% auto;
    color: transparent;
    -webkit-background-clip: text;
    background-clip: text;
    font-weight: 700;
    animation: rankShine 3s linear infinite;
}

.rank-titan {
    background: linear-gradient(90deg, #2563eb, #1e40af, #2563eb);
    background-size: 200% auto;
    color: transparent;
    -webkit-background-clip: text;
    background-clip: text;
    font-weight: 700;
    animation: rankShine 3s linear infinite;
}

.rank-immortal {
    background: linear-gradient(90deg, #7c3aed, #4c1d95, #7c3aed);
    background-size: 200% auto;
    color: transparent;
    -webkit-background-clip: text;
    background-clip: text;
    font-weight: 700;
    animation: rankShine 3s linear infinite;
}

.rank-omega {
    background: linear-gradient(90deg, #ec4899, #db2777, #ec4899);
    background-size: 200% auto;
    color: transparent;
    -webkit-background-clip: text;
    background-clip: text;
    font-weight: 700;
    animation: rankOmega 4s ease-in-out infinite;
    text-shadow: 0 0 15px rgba(236, 72, 153, 0.7);
}

@keyframes rankPulse {
    0% { opacity: 0.8; }
    50% { opacity: 1; }
    100% { opacity: 0.8; }
}

@keyframes rankGlow {
    0% { text-shadow: 0 0 8px rgba(251, 191, 36, 0.7); }
    50% { text-shadow: 0 0 16px rgba(251, 191, 36, 1); }
    100% { text-shadow: 0 0 8px rgba(251, 191, 36, 0.7); }
}

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

@keyframes rankOmega {
    0% { filter: hue-rotate(0deg); text-shadow: 0 0 10px rgba(236, 72, 153, 0.7); }
    25% { text-shadow: 0 0 20px rgba(236, 72, 153, 0.9); }
    50% { filter: hue-rotate(60deg); text-shadow: 0 0 10px rgba(236, 72, 153, 0.7); }
    75% { text-shadow: 0 0 20px rgba(236, 72, 153, 0.9); }
    100% { filter: hue-rotate(0deg); text-shadow: 0 0 10px rgba(236, 72, 153, 0.7); }
}
.ze1 {
    z-index: 10;
}
.toast {
    position: fixed;
    right: 1rem;
    padding: 1rem;
    border-radius: 0.5rem;
    color: white;
    transform: translateX(100%);
    animation: slideIn 0.3s forwards;
    z-index: 1000;
    min-width: 280px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

.toast.success {
    background-color: #10B981;
    border-left: 4px solid #059669;
}

.toast.error {
    background-color: #EF4444;
    border-left: 4px solid #DC2626;
}

.toast.warning {
    background-color: #F59E0B;
    border-left: 4px solid #D97706;
}

.toast.info {
    background-color: #3B82F6;
    border-left: 4px solid #2563EB;
}

.toast.conversion {
    background-color: #7c3aed;
    border-left: 4px solid #6d28d9;
}

.toast:nth-of-type(1) { top: 1rem; }
.toast:nth-of-type(2) { top: 2rem; }
.toast:nth-of-type(3) { top: 3rem; }
.toast:nth-of-type(4) { top: 4rem; }

@keyframes balanceFlash {
    0% { color: white; }
    50% { color: #10B981; }
    100% { color: white; }
}

.balance-update {
    animation: balanceFlash 2s ease-in-out;
}

@keyframes highlight {
    0% { box-shadow: 0 0 5px rgba(124, 58, 237, 0.5); }
    50% { box-shadow: 0 0 15px rgba(124, 58, 237, 0.8); }
    100% { box-shadow: 0 0 5px rgba(124, 58, 237, 0.5); }
}

@keyframes slideIn {
    0% { transform: translateX(100%); opacity: 0; }
    100% { transform: translateX(0); opacity: 1; }
}

@keyframes slideOut {
    0% { transform: translateX(0); opacity: 1; }
    100% { transform: translateX(100%); opacity: 0; }
}

.toast i {
    color: white !important;
}

.toast.conversion i {
    color: #ddd6fe !important;
}

.rank-scout {
  color: #ffffff; 
}

.rank-apprentice {
  color: #3498db; 
}

.rank-agent {
  color: #2ecc71; 
}

.rank-veteran {
  color: #e67e22;
}

.rank-specialist {
  color: #9b59b6;
}

.rank-commander {
  color: #f1c40f;
}

.rank-sentinel {
  color: #e74c3c;
}

.rank-grandmaster {
  color: #1abc9c; 
}

.rank-champion {
  color: #d35400; 
}

.rank-sigma {
  color: #8e44ad; 
}

.rank-overlord {
  color: #c0392b;
}

.rank-titan {
  color: #2980b9; 
}

.rank-immortal {
  color: #27ae60; 
}

.rank-omega {
  color: #f39c12;
}

.rank-agent, 
.rank-veteran, 
.rank-specialist, 
.rank-commander, 
.rank-sentinel, 
.rank-grandmaster, 
.rank-champion, 
.rank-sigma, 
.rank-overlord, 
.rank-titan, 
.rank-immortal, 
.rank-omega {
  text-shadow: 0 0 5px currentColor;
}

.rank-sentinel, 
.rank-grandmaster, 
.rank-champion, 
.rank-sigma, 
.rank-overlord, 
.rank-titan, 
.rank-immortal, 
.rank-omega {
  text-shadow: 0 0 8px currentColor, 0 0 12px currentColor;
}

.rank-champion, 
.rank-sigma, 
.rank-overlord, 
.rank-titan, 
.rank-immortal, 
.rank-omega {
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { opacity: 0.8; text-shadow: 0 0 8px currentColor, 0 0 12px currentColor; }
  50% { opacity: 1; text-shadow: 0 0 15px currentColor, 0 0 20px currentColor; }
  100% { opacity: 0.8; text-shadow: 0 0 8px currentColor, 0 0 12px currentColor; }
}

.rank-tag {
  display: inline-block;
  font-size: 0.7rem;
  padding: 1px 5px;
  border-radius: 3px;
  margin-left: 5px;
  font-weight: bold;
  vertical-align: middle;
}

.rank-tag-scout { background-color: #34495e; color: #ffffff; }
.rank-tag-apprentice { background-color: #3498db; color: #ffffff; }
.rank-tag-agent { background-color: #2ecc71; color: #ffffff; }
.rank-tag-veteran { background-color: #e67e22; color: #ffffff; }
.rank-tag-specialist { background-color: #9b59b6; color: #ffffff; }
.rank-tag-commander { background-color: #f1c40f; color: #000000; }
.rank-tag-sentinel { background-color: #e74c3c; color: #ffffff; }
.rank-tag-grandmaster { background-color: #1abc9c; color: #ffffff; }
.rank-tag-champion { background-color: #d35400; color: #ffffff; }
.rank-tag-sigma { background-color: #8e44ad; color: #ffffff; }
.rank-tag-overlord { background-color: #c0392b; color: #ffffff; }
.rank-tag-titan { background-color: #2980b9; color: #ffffff; }
.rank-tag-immortal { background-color: #27ae60; color: #ffffff; }
.rank-tag-omega { background-color: #f39c12; color: #000000; }

.rank-tag-agent, 
.rank-tag-veteran, 
.rank-tag-specialist, 
.rank-tag-commander, 
.rank-tag-sentinel, 
.rank-tag-grandmaster, 
.rank-tag-champion, 
.rank-tag-sigma, 
.rank-tag-overlord, 
.rank-tag-titan, 
.rank-tag-immortal, 
.rank-tag-omega {
  box-shadow: 0 0 5px currentColor;
}

.rank-tag-champion, 
.rank-tag-sigma, 
.rank-tag-overlord, 
.rank-tag-titan, 
.rank-tag-immortal, 
.rank-tag-omega {
  animation: border-pulse 2s infinite;
}

@keyframes border-pulse {
  0% { box-shadow: 0 0 5px currentColor; }
  50% { box-shadow: 0 0 10px currentColor, 0 0 15px currentColor; }
  100% { box-shadow: 0 0 5px currentColor; }
}

.bg-gradient-to-br:hover {
        transform: translateY(-2px);
        transition: transform 0.2s ease;
        box-shadow: 0 10px 25px -5px rgba(124, 58, 237, 0.1);
    }
    
    /* Pulse animation for main stat value on hover */
    .bg-gradient-to-br:hover .text-xl {
        animation: stat-pulse 2s infinite;
    }
    
    @keyframes stat-pulse {
        0% { text-shadow: 0 0 0px rgba(255, 255, 255, 0); }
        50% { text-shadow: 0 0 10px rgba(124, 58, 237, 0.5); }
        100% { text-shadow: 0 0 0px rgba(255, 255, 255, 0); }
    }
    
    /* Subtle glow effect for stat grid items on hover */
    .bg-gray-800\/30:hover {
        background-color: rgba(55, 65, 81, 0.5);
        transition: background-color 0.2s ease;
    }
        @keyframes shine {
        0% { transform: translateX(-100%); }
        100% { transform: translateX(100%); }
    }
    
    .shine-animation {
        animation: shine 2s infinite;
    }
    
    /* Better scrollbar styling to match theme */
    #chatMessages::-webkit-scrollbar,
    #privateChatMessages::-webkit-scrollbar {
        width: 8px;
        background-color: rgba(31, 41, 55, 0.5);
        border-radius: 4px;
    }
    
    #chatMessages::-webkit-scrollbar-thumb,
    #privateChatMessages::-webkit-scrollbar-thumb {
        background-color: rgba(124, 58, 237, 0.7);
        border-radius: 4px;
    }
    
    #chatMessages::-webkit-scrollbar-thumb:hover,
    #privateChatMessages::-webkit-scrollbar-thumb:hover {
        background-color: rgba(139, 92, 246, 0.8);
    }
    #chatMessages {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

#globalChat {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

.backdrop-blur-sm {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

   .currency-dropdown-container {
        position: relative;
        display: inline-flex;
        align-items: center;
    }
    
    .currency-dropdown-btn {
        display: inline-flex;
        align-items: center;
        cursor: pointer;
        padding: 2px 4px;
        border-radius: 4px;
    }
    
    .currency-dropdown-btn:hover {
        background-color: rgba(255, 255, 255, 0.1);
    }
    
    /* Fixed dropdown positioning */
    .currency-dropdown {
        position: absolute;
        top: 100%; /* Position below the container */
        right: 0;
        margin-top: 8px; /* Add some margin from the button */
        z-index: 50;
        max-height: 300px; /* Limit maximum height */
        overflow-y: auto; /* Add scrolling for overflow */
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    }
    
    .currency-option {
        transition: background-color 0.2s;
    }
    
    /* Animation for currency changes */
    @keyframes currencyHighlight {
        0% { color: inherit; }
        50% { color: #8b5cf6; }
        100% { color: inherit; }
    }
    
    .currency-highlight {
        animation: currencyHighlight 1s ease-in-out;
    }
    
    .coinflip-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100px;
    perspective: 1000px;
}

.coinflip-coin {
    width: 80px;
    height: 80px;
    position: relative;
    transform-style: preserve-3d;
    border-radius: 50%;
}

.coinflip-side {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    backface-visibility: hidden;
    border: 3px solid #fbbf24;
    overflow: hidden;
}

.coinflip-heads {
    transform: rotateY(0deg);
}

.coinflip-tails {
    transform: rotateY(180deg);
}

.coinflip-coin.show-heads {
    transform: rotateY(0deg);
}

.coinflip-coin.show-tails {
    transform: rotateY(180deg);
}

.coinflip-coin.coinflip-result {
    box-shadow: 0 0 20px rgba(251, 191, 36, 0.8);
    animation: coinflip-glow 1s ease-in-out infinite alternate;
}

@keyframes coinflip-spin {
    0% { transform: rotateY(0deg) rotateX(0deg); }
    25% { transform: rotateY(90deg) rotateX(180deg); }
    50% { transform: rotateY(180deg) rotateX(360deg); }
    75% { transform: rotateY(270deg) rotateX(540deg); }
    100% { transform: rotateY(720deg) rotateX(720deg); }
}

@keyframes coinflip-glow {
    from { box-shadow: 0 0 10px rgba(251, 191, 36, 0.5); }
    to { box-shadow: 0 0 30px rgba(251, 191, 36, 1); }
}

/* Challenge message styles */
.coinflip-challenge {
    animation: slideInRight 0.5s ease-out;
}

.coinflip-game {
    animation: slideInRight 0.5s ease-out;
}

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

/* Add this to your existing coinflip CSS */

/* Winner highlighting - add this to the end of your current CSS */
.coinflip-winner {
    border-color: #10b981 !important; /* Green border for winner */
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.8); /* Green glow for winner */
    animation: winner-pulse 1s ease-in-out 3 alternate;
}

@keyframes winner-pulse {
    from { 
        box-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
        border-color: #10b981;
    }
    to { 
        box-shadow: 0 0 25px rgba(16, 185, 129, 1);
        border-color: #34d399;
    }
}

/* Add these classes to your existing coinflip CSS */

/* Winner highlighting - GREEN when you win */
.coinflip-winner-green {
    border-color: #10b981 !important; /* Green border */
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.8); /* Green glow */
    animation: winner-pulse-green 1s ease-in-out 3 alternate;
}

/* Winner highlighting - RED when you lose */
.coinflip-winner-red {
    border-color: #ef4444 !important; /* Red border */
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.8); /* Red glow */
    animation: winner-pulse-red 1s ease-in-out 3 alternate;
}

/* Neutral highlighting for other users watching */
.coinflip-winner-neutral {
    border-color: #fbbf24 !important; /* Yellow border (your existing color) */
    box-shadow: 0 0 15px rgba(251, 191, 36, 0.8); /* Yellow glow */
    animation: winner-pulse-neutral 1s ease-in-out 3 alternate;
}

/* Green pulse animation for wins */
@keyframes winner-pulse-green {
    from { 
        box-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
        border-color: #10b981;
    }
    to { 
        box-shadow: 0 0 25px rgba(16, 185, 129, 1);
        border-color: #34d399;
    }
}

/* Red pulse animation for losses */
@keyframes winner-pulse-red {
    from { 
        box-shadow: 0 0 10px rgba(239, 68, 68, 0.5);
        border-color: #ef4444;
    }
    to { 
        box-shadow: 0 0 25px rgba(239, 68, 68, 1);
        border-color: #f87171;
    }
}

/* Neutral pulse animation for spectators */
@keyframes winner-pulse-neutral {
    from { 
        box-shadow: 0 0 10px rgba(251, 191, 36, 0.5);
        border-color: #fbbf24;
    }
    to { 
        box-shadow: 0 0 25px rgba(251, 191, 36, 1);
        border-color: #fcd34d;
    }
}

/* Add this CSS for live balance update visual feedback */

.balance-increase {
    color: #10b981 !important; /* Green */
    transform: scale(1.1);
    transition: all 0.3s ease;
    text-shadow: 0 0 8px rgba(16, 185, 129, 0.5);
}

.balance-decrease {
    color: #ef4444 !important; /* Red */
    transform: scale(0.95);
    transition: all 0.3s ease;
    text-shadow: 0 0 8px rgba(239, 68, 68, 0.5);
}

/* Animation for balance changes */
@keyframes balance-pop {
    0% { transform: scale(1); }
    50% { transform: scale(1.15); }
    100% { transform: scale(1); }
}

.balance-increase {
    animation: balance-pop 0.4s ease-out;
}

.balance-decrease {
    animation: balance-pop 0.4s ease-out;
}

/* ============================================
   ANALYTICS CONTROLS WRAPPER STYLES
   ============================================ */

/* Wrapper for all analytics controls */
.analytics-controls-wrapper {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Time range buttons container */
.analytics-time-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* Individual time button styles */
.time-btn {
    padding: 0.5rem 1rem;
    background-color: #374151;
    color: white;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s;
    white-space: nowrap;
}

.time-btn:hover {
    background-color: #4b5563;
}

.time-btn-active {
    background-color: #7c3aed !important;
}

/* Bottom controls row */
.analytics-bottom-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* Common styles for bottom controls */
.analytics-control {
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

/* Timezone select */
.analytics-control[id="analyticsTimezoneSelect"] {
    background-color: #374151;
    color: white;
    flex: 1;
    min-width: 200px;
}

/* Link splitters button */
.btn-green {
    background-color: #16a34a;
    color: white;
    flex: 1;
    min-width: 150px;
}

.btn-green:hover {
    background-color: #15803d;
}

/* Export button */
.btn-gradient {
    background: linear-gradient(-45deg, #4f46e5, #7c3aed, #2563eb, #3b82f6);
    background-size: 400% 400%;
    color: white;
    flex: 1;
    min-width: 120px;
}

.btn-gradient:hover {
    opacity: 0.9;
}

/* ============================================
   MOBILE RESPONSIVE STYLES FOR ANALYTICS
   ============================================ */

/* Mobile - up to 768px */
@media (max-width: 768px) {
    /* Analytics controls wrapper */
    .analytics-controls-wrapper {
        gap: 0.75rem;
    }
    
    /* Time range buttons - make them smaller and wrap */
    .analytics-time-buttons {
        gap: 0.375rem;
    }
    
    .time-btn {
        padding: 0.375rem 0.5rem;
        font-size: 0.7rem;
        flex: 1 1 auto;
        min-width: 0;
    }
    
    /* Bottom controls - stack vertically */
    .analytics-bottom-controls {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .analytics-control {
        width: 100%;
        min-width: 0;
    }
    
    /* FALLBACK: For original HTML structure without new classes */
    .mb-8 > .flex.flex-wrap.gap-4.items-center.mb-4 {
        gap: 0.5rem !important;
        flex-direction: column;
    }
    
    .mb-8 > .flex.flex-wrap.gap-4.items-center.mb-4 > .flex.space-x-2 {
        width: 100%;
        gap: 0.25rem;
        justify-content: space-between;
    }
    
    .mb-8 > .flex.flex-wrap.gap-4.items-center.mb-4 > .flex.space-x-2 button {
        padding: 0.375rem 0.5rem !important;
        font-size: 0.7rem !important;
        flex: 1 1 auto;
        min-width: 0;
        white-space: nowrap;
    }
    
    .mb-8 > .flex.flex-wrap.gap-4.items-center.mb-4 > .flex-1 {
        display: none !important;
    }
    
    .mb-8 > .flex.flex-wrap.gap-4.items-center.mb-4 > select,
    .mb-8 > .flex.flex-wrap.gap-4.items-center.mb-4 > button[id="openLinkSplittersBtn"],
    .mb-8 > .flex.flex-wrap.gap-4.items-center.mb-4 > button[onclick="exportAnalytics()"] {
        width: 100% !important;
        justify-content: center;
        margin-top: 0;
    }
    
    /* Make analytics cards stack nicely */
    .bg-gradient-to-br.from-gray-800.to-gray-900 .grid.grid-cols-2.md\\:grid-cols-5 {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    /* Adjust chart height on mobile */
    .chart-container {
        height: 200px !important;
    }
    
    /* Make countries panel full width on mobile */
    .grid.grid-cols-1.lg\\:grid-cols-3 {
        grid-template-columns: 1fr !important;
    }
}

/* Small mobile - up to 480px */
@media (max-width: 480px) {
    /* Time buttons even smaller on very small screens */
    .time-btn {
        padding: 0.25rem 0.375rem;
        font-size: 0.65rem;
    }
    
    /* FALLBACK for original structure */
    .mb-8 > .flex.flex-wrap.gap-4.items-center.mb-4 > .flex.space-x-2 button {
        padding: 0.25rem 0.375rem !important;
        font-size: 0.65rem !important;
    }
    
    /* Stack stats into single column on very small screens */
    .bg-gradient-to-br.from-gray-800.to-gray-900 .grid.grid-cols-2.md\\:grid-cols-5 {
        grid-template-columns: 1fr !important;
    }
}

/* Tablet - 769px to 1024px */
@media (max-width: 1024px) and (min-width: 769px) {
    /* Slightly smaller buttons for tablets */
    .time-btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.8rem;
    }
    
    /* FALLBACK for original structure */
    .mb-8 > .flex.flex-wrap.gap-4.items-center.mb-4 > .flex.space-x-2 button {
        padding: 0.5rem 0.75rem;
        font-size: 0.8rem;
    }
    
    /* Adjust analytics card grid for tablets */
    .bg-gradient-to-br.from-gray-800.to-gray-900 .grid.grid-cols-2.md\\:grid-cols-5 {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}
