/* ===== HEADER STATUS INDICATORS ===== */
/* Add this to your existing styles.css */

/* Stat Pills in Header */
.header-stats {
    display: flex;
    align-items: center;
    gap: 12px;
}

.stat-pill {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    font-size: 13px;
    transition: all 0.2s ease;
}

.stat-pill:hover {
    background: rgba(255, 255, 255, 0.12);
}

.stat-pill .value {
    font-weight: 700;
    color: var(--text-primary, #f1f5f9);
    min-width: 20px;
    text-align: center;
}

.stat-pill .label {
    color: var(--text-muted, #94a3b8);
    font-size: 12px;
}

/* Stat Update Animation */
.stat-pill .value.stat-updated {
    animation: statPulse 0.3s ease;
}

@keyframes statPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); color: #10b981; }
    100% { transform: scale(1); }
}

/* Connection Status Indicator */
#connectionStatus {
    cursor: pointer;
}

#connectionStatus:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* Status Dot */
.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #64748b;
    transition: all 0.3s ease;
}

.status-dot.connected {
    background: #10b981;
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.6);
    animation: pulse-connected 2s ease-in-out infinite;
}

.status-dot.connecting {
    background: #f59e0b;
    animation: pulse-connecting 1s ease-in-out infinite;
}

.status-dot.disconnected {
    background: #ef4444;
}

@keyframes pulse-connected {
    0%, 100% { opacity: 1; box-shadow: 0 0 8px rgba(16, 185, 129, 0.6); }
    50% { opacity: 0.7; box-shadow: 0 0 12px rgba(16, 185, 129, 0.8); }
}

@keyframes pulse-connecting {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* Online/Offline Status Styling */
#connectionStatus.online {
    border-color: rgba(16, 185, 129, 0.3);
    background: rgba(16, 185, 129, 0.1);
}

#connectionStatus.online .label {
    color: #10b981;
}

#connectionStatus.offline {
    border-color: rgba(239, 68, 68, 0.2);
    background: rgba(239, 68, 68, 0.05);
}

#connectionStatus.offline .label {
    color: #f87171;
}

/* XP Progress in Header */
.xp-mini-bar {
    width: 60px;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
    margin-top: 2px;
}

.xp-mini-fill {
    height: 100%;
    background: linear-gradient(90deg, #10b981, #3b82f6);
    border-radius: 2px;
    transition: width 0.5s ease;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .header-stats {
        gap: 8px;
    }

    .stat-pill {
        padding: 4px 8px;
        font-size: 12px;
    }

    .stat-pill .label {
        display: none;
    }
}

/* Tooltip for status */
.stat-pill[title] {
    position: relative;
}

.stat-pill[title]:hover::after {
    content: attr(title);
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 8px;
    padding: 6px 10px;
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    font-size: 11px;
    color: var(--text-secondary, #cbd5e1);
    white-space: nowrap;
    z-index: 100;
}