/* Agent Stream UI — 流式输出样式 */

.agent-stream-container {
    max-height: 600px;
    overflow-y: auto;
    padding: 16px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: #e0e0e0;
}

/* 进度条 */
.agent-overall-progress {
    position: sticky;
    top: 0;
    z-index: 10;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    padding: 8px 0;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.agent-progress-bar-bg {
    flex: 1;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
}

.agent-progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #00d4ff, #7c3aed);
    border-radius: 3px;
    transition: width 0.3s ease;
}

.agent-progress-text {
    font-size: 12px;
    color: #aaa;
    white-space: nowrap;
}

/* 步骤列表 */
.agent-steps {
    margin-bottom: 16px;
}

.agent-step {
    padding: 10px 12px;
    margin-bottom: 6px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid transparent;
    transition: all 0.2s;
}

.agent-step-running {
    background: rgba(0, 212, 255, 0.08);
    border-color: rgba(0, 212, 255, 0.3);
}

.agent-step-completed {
    opacity: 0.7;
}

.agent-step-failed {
    background: rgba(255, 50, 50, 0.1);
    border-color: rgba(255, 50, 50, 0.3);
}

.agent-step-header {
    display: flex;
    align-items: center;
    gap: 8px;
}

.agent-step-icon {
    font-size: 16px;
}

.agent-step-name {
    flex: 1;
    font-weight: 500;
    color: #ddd;
}

.agent-step-status {
    font-size: 12px;
    color: #888;
}

.agent-step-bar {
    height: 2px;
    background: #00d4ff;
    margin-top: 6px;
    border-radius: 1px;
    transition: width 0.3s ease;
}

/* Skill 徽章 */
.agent-skills {
    margin-bottom: 16px;
    padding: 10px 12px;
    background: rgba(124, 58, 237, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(124, 58, 237, 0.2);
}

.agent-skills-title {
    font-size: 13px;
    color: #c4b5fd;
    margin-bottom: 8px;
}

.agent-skill-badge {
    display: inline-block;
    padding: 4px 10px;
    margin: 2px 4px 2px 0;
    background: rgba(124, 58, 237, 0.15);
    border-radius: 6px;
    font-size: 12px;
}

.agent-skill-badge strong {
    color: #ddd6fe;
}

.agent-skill-tags {
    margin-left: 6px;
    color: #a78bfa;
    font-size: 11px;
}

/* 生成内容输出 */
.agent-output {
    padding: 12px;
    margin-bottom: 16px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    white-space: pre-wrap;
    word-wrap: break-word;
    font-size: 14px;
    line-height: 1.8;
    color: #d1d5db;
}

/* 日志 */
.agent-log {
    margin-bottom: 16px;
    font-family: "SF Mono", Monaco, "Cascadia Code", monospace;
    font-size: 12px;
}

.agent-log-entry {
    display: flex;
    gap: 6px;
    padding: 2px 0;
    color: #999;
}

.agent-log-icon {
    flex-shrink: 0;
}

.agent-log-text {
    color: #aaa;
}

.agent-log-success .agent-log-text { color: #4ade80; }
.agent-log-error .agent-log-text { color: #f87171; }
.agent-log-warning .agent-log-text { color: #fbbf24; }
.agent-log-thinking .agent-log-text { color: #60a5fa; font-style: italic; }
.agent-log-skill .agent-log-text { color: #c4b5fd; }
.agent-log-plan .agent-log-text { color: #67e8f9; }

/* 完成状态 */
.agent-done {
    margin-top: 16px;
    padding: 16px;
    border-radius: 8px;
    text-align: center;
}

.agent-done-status {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
}

.agent-done-status.success {
    color: #4ade80;
}

.agent-done-status.failure {
    color: #f87171;
}

.agent-done-stats {
    font-size: 12px;
    color: #888;
}

/* Agent 弹窗 */
.agent-modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

.agent-modal {
    background: #1a1a2e;
    border-radius: 16px;
    width: 90%;
    max-width: 800px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.agent-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.agent-modal-title {
    font-size: 16px;
    font-weight: 600;
    color: #fff;
}

.agent-modal-close {
    background: none;
    border: none;
    color: #888;
    cursor: pointer;
    font-size: 20px;
    padding: 4px 8px;
    border-radius: 6px;
    transition: all 0.2s;
}

.agent-modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.agent-modal-body {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.agent-modal-body .agent-stream-container {
    flex: 1;
    border: none;
    border-radius: 0;
    max-height: none;
}

.agent-modal-footer {
    padding: 12px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.agent-btn {
    padding: 8px 20px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}

.agent-btn-cancel {
    background: rgba(255, 255, 255, 0.1);
    color: #ccc;
}

.agent-btn-cancel:hover {
    background: rgba(255, 255, 255, 0.15);
}

.agent-btn-primary {
    background: #7c3aed;
    color: #fff;
}

.agent-btn-primary:hover {
    background: #6d28d9;
}
