/* 在线人数 + 延迟 浮标样式 */
.presence-widget {
    position: fixed;
    right: 16px;
    bottom: 16px;
    z-index: 9998;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    font-size: 12px;
    line-height: 1;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--text-secondary, var(--text-primary, #f0f0f0));
    background: var(--bg-secondary, rgba(20, 20, 24, 0.92));
    border: 1px solid var(--border-color, rgba(255, 255, 255, 0.1));
    border-radius: var(--radius-full, 9999px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    user-select: none;
    pointer-events: none;
    opacity: 0.9;
    transition: opacity 0.2s ease;
}

.presence-widget:hover {
    opacity: 1;
}

.presence-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #3fb950;
    box-shadow: 0 0 0 rgba(63, 185, 80, 0.5);
    animation: presence-pulse 2s infinite;
    flex-shrink: 0;
}

@keyframes presence-pulse {
    0% { box-shadow: 0 0 0 0 rgba(63, 185, 80, 0.5); }
    70% { box-shadow: 0 0 0 6px rgba(63, 185, 80, 0); }
    100% { box-shadow: 0 0 0 0 rgba(63, 185, 80, 0); }
}

.presence-online {
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.presence-online::after {
    content: " 在线";
    font-weight: 400;
    opacity: 0.6;
}

.presence-sep {
    width: 1px;
    height: 12px;
    background: var(--border-color, rgba(255, 255, 255, 0.15));
}

.presence-latency {
    font-variant-numeric: tabular-nums;
}

.presence-lat-good { color: #3fb950; }
.presence-lat-ok   { color: #d29922; }
.presence-lat-bad  { color: #f85149; }

@media (max-width: 640px) {
    .presence-widget {
        right: 10px;
        bottom: 10px;
        padding: 5px 10px;
        font-size: 11px;
    }
}
