* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: #e2e8f0;
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 900px;
    margin: 0 auto;
}

/* 头部 */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    margin-bottom: 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.header h1 {
    font-size: 28px;
    font-weight: 700;
    background: linear-gradient(135deg, #60a5fa 0%, #a78bfa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.connection-status {
    display: flex;
    align-items: center;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    font-size: 14px;
}

.indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ef4444;
    margin-right: 8px;
    animation: pulse 2s infinite;
}

.indicator.connected {
    background: #10b981;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Agent 卡片网格 */
.agents-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.agent-card {
    background: rgba(30, 41, 59, 0.8);
    border-radius: 16px;
    padding: 24px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    transition: transform 0.2s, box-shadow 0.2s;
}

.agent-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.agent-header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.avatar {
    font-size: 48px;
    margin-right: 16px;
}

.agent-info {
    flex: 1;
}

.agent-name {
    font-size: 20px;
    font-weight: 600;
    color: #f1f5f9;
    margin-bottom: 4px;
}

.session-key {
    font-size: 12px;
    color: #64748b;
    font-family: 'Monaco', 'Consolas', monospace;
}

.status-badge {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
}

.status-badge.working {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.4);
}

.status-badge.resting {
    background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
    color: white;
}

/* 详情 */
.agent-details {
    background: rgba(15, 23, 42, 0.5);
    border-radius: 12px;
    padding: 16px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-row .label {
    color: #94a3b8;
    font-size: 14px;
}

.detail-row .value {
    color: #e2e8f0;
    font-size: 14px;
    font-weight: 500;
    text-align: right;
    max-width: 60%;
    word-break: break-word;
}

/* 长文本优化 */
.long-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    display: inline-block;
}

.long-text:hover {
    white-space: normal;
    word-wrap: break-word;
    max-width: none;
    z-index: 10;
    position: relative;
}

/* 底部 */
.footer {
    text-align: center;
    padding: 20px;
    color: #64748b;
    font-size: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* 加载状态 */
.loading {
    text-align: center;
    padding: 40px;
    color: #64748b;
    font-size: 16px;
}

/* 响应式 */
@media (max-width: 768px) {
    body {
        padding: 15px;
    }
    
    .header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .header h1 {
        font-size: 24px;
    }
    
    .agents-grid {
        grid-template-columns: 1fr;
    }
    
    .agent-header {
        flex-wrap: wrap;
    }
    
    .avatar {
        font-size: 40px;
        margin-right: 12px;
    }
    
    .agent-info {
        flex: 1;
        min-width: 150px;
    }
    
    .status-badge {
        width: 100%;
        margin-top: 10px;
        text-align: center;
    }
    
    .detail-row .value {
        max-width: 70%;
    }
}