/* Token Performance Bar - Professional TradingView Style */
.token-performance-bar {
    background: linear-gradient(135deg, #0D1117 0%, #161b22 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 8px 12px;
    margin-bottom: 15px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
    position: relative;
    overflow: hidden;
}

.performance-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
}

.performance-container::-webkit-scrollbar {
    height: 4px;
}

.performance-container::-webkit-scrollbar-track {
    background: transparent;
}

.performance-container::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
}

/* Token Info Section */
.token-info-section {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
    padding-right: 12px;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.token-logo {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: white;
    flex-shrink: 0;
}

.token-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.token-name {
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 6px;
}

.token-symbol {
    font-size: 11px;
    color: #888;
    text-transform: uppercase;
}

/* Metrics Grid */
.metrics-grid {
    display: flex;
    gap: 15px;
    flex: 1;
    align-items: center;
    min-width: 0;
}

.metric-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: fit-content;
    flex-shrink: 0;
}

.metric-label {
    font-size: 10px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.metric-value {
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.metric-value.positive {
    color: #00d4aa;
}

.metric-value.negative {
    color: #ff4757;
}

.change-badge {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
}

.change-badge.positive {
    background: rgba(0, 212, 170, 0.15);
    color: #00d4aa;
}

.change-badge.negative {
    background: rgba(255, 71, 87, 0.15);
    color: #ff4757;
}

.change-arrow {
    font-size: 10px;
}

/* Quick Stats */
.quick-stats {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-shrink: 0;
    padding-left: 12px;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-pill {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    font-size: 11px;
    color: #999;
    white-space: nowrap;
}

.stat-pill .value {
    color: #fff;
    font-weight: 600;
}

/* Trading View Widgets Container */
.tv-widgets-row {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-shrink: 0;
}

.tv-mini-widget {
    height: 24px;
    min-width: 60px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 4px;
    padding: 2px 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    color: #888;
    position: relative;
    overflow: hidden;
}

/* Sparkline Chart */
.sparkline-container {
    width: 80px;
    height: 30px;
    position: relative;
    flex-shrink: 0;
}

.sparkline {
    width: 100%;
    height: 100%;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .token-performance-bar {
        padding: 6px 8px;
        margin-bottom: 10px;
        border-radius: 8px;
    }
    
    .performance-container {
        gap: 8px;
        overflow-x: scroll;
        -webkit-overflow-scrolling: touch;
    }
    
    .token-info-section {
        gap: 8px;
        padding-right: 8px;
    }
    
    .token-logo {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }
    
    .token-name {
        font-size: 12px;
    }
    
    .token-symbol {
        font-size: 10px;
    }
    
    .metrics-grid {
        gap: 10px;
    }
    
    .metric-label {
        font-size: 9px;
    }
    
    .metric-value {
        font-size: 11px;
    }
    
    .change-badge {
        font-size: 10px;
        padding: 1px 4px;
    }
    
    .quick-stats {
        gap: 6px;
        padding-left: 8px;
    }
    
    .stat-pill {
        padding: 3px 6px;
        font-size: 10px;
    }
    
    .sparkline-container {
        width: 60px;
        height: 24px;
    }
    
    /* Hide some metrics on very small screens */
    @media (max-width: 480px) {
        .metric-item:nth-child(n+4) {
            display: none;
        }
        
        .quick-stats {
            display: none;
        }
    }
}

/* Extra small devices */
@media (max-width: 375px) {
    .token-performance-bar {
        padding: 4px 6px;
    }
    
    .metrics-grid {
        gap: 8px;
    }
    
    .metric-item {
        min-width: 50px;
    }
    
    .token-info-section {
        gap: 6px;
    }
}

/* Animated Background Effect */
.token-performance-bar::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(79, 209, 197, 0.1), transparent);
    animation: shimmer 3s infinite;
    pointer-events: none;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Loading State */
.metric-loading {
    background: linear-gradient(90deg, #1a1d29 0%, #2a2d39 50%, #1a1d29 100%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: 4px;
    height: 16px;
    width: 60px;
}

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