:root {
    --bg: #0d1117;
    --panel: #161b22;
    --text: #c9d1d9;
    --accent: #58a6ff;
    --green: #3fb950;
    --yellow: #d29922;
    --red: #f85149;
    --purple: #a371f7;
    --border: #30363d;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 16px;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
}

.container { max-width: 1600px; margin: 0 auto; padding: 20px 40px; }

/* Tabs */
.tabs { display: flex; gap: 4px; margin-bottom: 16px; }
.tab {
    padding: 10px 20px; border-radius: 6px 6px 0 0; cursor: pointer;
    border: 1px solid var(--border); border-bottom: none;
    background: var(--bg); color: #8b949e; font-size: 15px;
}
.tab.active { background: var(--panel); color: var(--accent); border-color: var(--border); }

/* Panels */
.panel { display: none; }
.panel.active { display: block; }

/* Status bar */
.status-bar {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 16px; background: var(--bg);
    border: 1px solid var(--border); border-radius: 6px 6px 0 0;
    font-family: 'Courier New', monospace; font-size: 14px;
}
.status-dot {
    width: 8px; height: 8px; border-radius: 50%; display: inline-block;
}
.status-group { display: flex; align-items: center; gap: 6px; }
.status-separator { color: var(--border); }

/* Terminal */
.terminal {
    background: #010409; border: 1px solid var(--border); border-top: none;
    font-family: 'Courier New', monospace; font-size: 16px;
    min-height: 400px; max-height: 70vh; overflow-y: auto;
    padding: 12px 16px;
}
.terminal-line { padding: 1px 0; white-space: pre-wrap; word-break: break-word; }
.terminal-prompt { color: var(--yellow); margin-right: 8px; }
.terminal-input-row {
    display: flex; align-items: center; position: relative;
    background: #0d1117; border: 1px solid var(--accent); border-top: none;
    border-radius: 0 0 6px 6px; padding: 10px 14px;
    font-family: 'Courier New', monospace; font-size: 15px;
    box-shadow: 0 2px 8px rgba(88,166,255,0.1);
}
.terminal-input {
    flex: 1; background: transparent; border: none; outline: none;
    color: var(--green); font-family: inherit; font-size: 16px;
}
.terminal-dropdown {
    display: none; position: absolute; bottom: 100%; left: 30px;
    background: var(--panel); border: 1px solid var(--border);
    border-radius: 6px; max-height: 200px; overflow-y: auto;
    font-size: 13px; min-width: 200px; z-index: 100;
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}
.dd-item {
    padding: 6px 12px; cursor: pointer; color: var(--text);
    white-space: nowrap; border-bottom: 1px solid #21262d;
}
.dd-item:hover, .dd-item.active { background: var(--border); color: var(--accent); }

/* Pipeline progress */
.pipeline-bar {
    display: none; padding: 8px 14px; background: var(--bg);
    border: 1px solid var(--border); border-top: none;
    font-family: 'Courier New', monospace; font-size: 12px;
    overflow-x: auto; white-space: nowrap;
}

/* Project card */
.project-card {
    margin: 8px 0; border: 1px solid var(--border);
    border-radius: 6px; background: var(--panel); overflow: hidden;
}
.project-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 8px 12px; background: var(--bg); border-bottom: 1px solid var(--border);
}
.project-tabs { display: flex; gap: 2px; padding: 6px 8px 0; background: var(--bg); }
.project-tab {
    padding: 4px 10px; cursor: pointer; border-radius: 4px 4px 0 0;
    font-size: 12px; color: #8b949e;
}
.project-tab.active { background: var(--panel); color: var(--accent); border: 1px solid var(--border); border-bottom: none; }

/* Buttons */
.btn {
    padding: 2px 10px; border-radius: 4px;
    border: 1px solid var(--border); background: var(--panel);
    font-size: 12px; font-family: inherit; cursor: pointer;
}
.btn-accent { color: var(--accent); }
.btn-green { color: var(--green); border-color: var(--green); }
.btn-red { color: var(--red); border-color: var(--red); }
.btn-muted { color: #8b949e; background: none; }

/* Code display */
.code-block {
    font-family: 'Courier New', monospace; background: #010409;
    border: 1px solid var(--border); border-radius: 6px;
    padding: 14px; font-size: 13px; line-height: 1.6;
    white-space: pre-wrap; overflow-x: auto; max-height: 400px; overflow-y: auto;
}
.code-block .hljs { background: transparent; padding: 0; }

/* Agent avatars */
.agent-avatar {
    background: linear-gradient(145deg, rgba(33,38,45,0.4) 0%, rgba(13,17,23,0.8) 100%);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(240,246,252,0.1);
    border-radius: 14px;
    padding: 8px 8px 6px;
    text-align: center;
    width: 90px;
    opacity: 0.8;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}
.agent-avatar:hover {
    opacity: 0.85;
    transform: translateY(-2px) scale(1.02);
    border-color: rgba(240,246,252,0.3);
    box-shadow: 0 8px 14px rgba(0,0,0,0.4);
}
.agent-avatar img {
    width: 64px; height: 64px; border-radius: 14px;
    margin-bottom: 4px; border: 2px solid rgba(240,246,252,0.1);
    transition: all 0.4s ease; object-fit: cover;
}
.agent-avatar .avatar-name {
    font-size: 11px; color: #8b949e; white-space: nowrap;
    overflow: hidden; text-overflow: ellipsis;
}
.agent-avatar.active {
    opacity: 1;
    transform: translateY(-8px) scale(1.05);
    border-color: var(--accent);
    background: linear-gradient(145deg, rgba(88,166,255,0.15) 0%, rgba(13,17,23,0.9) 100%);
    box-shadow: 0 16px 24px rgba(0,0,0,0.5), 0 0 20px rgba(88,166,255,0.3);
    z-index: 2;
}
.agent-avatar.active img {
    border-color: var(--accent);
    box-shadow: 0 0 25px rgba(88,166,255,0.8);
}

/* Settings */
.settings-section {
    margin-bottom: 24px; padding: 16px; background: var(--panel);
    border: 1px solid var(--border); border-radius: 6px;
}
.settings-title { color: #e6edf3; font-size: 15px; margin-bottom: 4px; }
.settings-desc { color: #8b949e; font-size: 13px; margin-bottom: 12px; }
.settings-label { color: var(--text); font-size: 13px; display: block; margin-bottom: 4px; }
.settings-val { color: var(--accent); font-weight: 600; float: right; }
.settings-hint { color: #8b949e; font-size: 11px; margin-top: 2px; }
.settings-textarea {
    width: 100%; background: var(--bg); color: var(--text);
    border: 1px solid var(--border); border-radius: 4px;
    padding: 8px; font-size: 13px; font-family: 'Courier New', monospace;
    resize: vertical;
}
.settings-select {
    width: 100%; background: var(--bg); color: var(--text);
    border: 1px solid var(--border); border-radius: 4px;
    padding: 8px; font-size: 13px;
}
.settings-slider {
    width: 100%; accent-color: var(--accent);
}
.settings-grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
}

/* Animations */
@keyframes blink { 0%,100% { opacity:1 } 50% { opacity:0 } }
@keyframes spin { to { transform: rotate(360deg) } }
