.user-activity-indicator {
    display: flex;
    align-items: center;
    font-size: 11px;
    color: #666;
    padding: 4px 8px;
    border-radius: 4px;
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.activity-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    margin-right: 4px;
    background-color: #28a745;
    animation: pulse 2s infinite;
}

.inactive .activity-dot {
    background-color: #dc3545;
    animation: blink 1s infinite;
}

.active .activity-dot {
    background-color: #28a745;
}

/* 當剩餘時間少於30秒時，圓點變成警告色 */
.warning .activity-dot {
    background-color: #ffc107;
    animation: urgent-blink 0.5s infinite;
}

.activity-text {
    white-space: nowrap;
    font-weight: 500;
}

.remaining-time {
    margin-left: 4px;
    color: #dc3545;
    font-weight: bold;
    white-space: nowrap;
    font-family: monospace; /* 使用等寬字體，數字對齊更美觀 */
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0.3; }
}

@keyframes urgent-blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0.1; }
}

/* 響應式設計 */
@media (max-width: 768px) {
    .user-activity-indicator {
        font-size: 10px;
        padding: 2px 6px;
    }
    
    .activity-text {
        display: none; /* 在小螢幕上隱藏文字，只保留圖示和時間 */
    }
}