/* Common styles */
body {
    background-color: #121212;
    color: #e0e0e0;
}

/* Dark mode form controls */
.form-control {
    background-color: #2c2c2c;
    border-color: #444;
    color: #e0e0e0;
}

.form-control:focus {
    background-color: #363636;
    border-color: #666;
    color: #e0e0e0;
    box-shadow: 0 0 0 0.2rem rgba(255, 255, 255, 0.1);
}

.card {
    background-color: #1e1e1e;
    border-color: #333;
}

.card-header {
    background-color: #242424;
    border-bottom-color: #333;
}

.container { 
    max-width: 1000px; 
    margin-top: 2rem;
    padding: 0 20px;
}

.form-group { 
    margin-bottom: 1rem; 
}

/* Task list styles */
#taskList { 
    margin-bottom: 1rem;
    max-width: 100%;
}

.task-item { 
    background: #2c2c2c;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 1rem;
}

.task-item .form-control { 
    margin-bottom: 0.75rem;
}

.task-item .task-title {
    font-size: 1.1rem;
    font-weight: 500;
}

.task-item .task-description {
    min-height: 100px;
    resize: vertical;
}

.task-item button {
    margin-top: 0.5rem;
    width: 100%;
}

@media (min-width: 768px) {
    .task-item button {
        width: auto;
    }
}

/* Minimal agent card styles */
.agent-card {
    border: 1px solid #333;
    background: #1e1e1e;
}

.agent-card .card-header {
    background: #242424;
    border-bottom: 1px solid #333;
    padding: 0.75rem 1rem;
}

.agent-card .collapse {
    padding: 1rem;
}

.agent-card h6 {
    margin-top: 1rem;
    margin-bottom: 0.5rem;
}

.agent-card p {
    margin-bottom: 1rem;
}

.agent-card .card-header:hover {
    background: #2a2a2a;
}

.agent-card .collapse-icon {
    transition: transform 0.2s;
}

.agent-card .collapsed .collapse-icon {
    transform: rotate(-90deg);
}

.agent-card .current-progress {
    max-width: 60%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.delete-agent-btn:hover {
    background: #dc3545;
    color: white;
}

/* CLI output styles */
.cli-output {
    background-color: #1e1e1e;
    color: #d4d4d4;
    padding: 1rem;
    border-radius: 5px;
    font-family: 'Courier New', Courier, monospace;
    white-space: pre-wrap;
    word-wrap: break-word;
    max-height: 400px;
    overflow-y: auto;
    font-size: 0.6rem;
    line-height: 1.4;
    tab-size: 4;
    position: relative;
    border: 1px solid #333;
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}

.cli-output:empty::before {
    content: 'No output available yet...';
    color: #666;
    font-style: italic;
}

.cli-output:hover {
    border-color: #495057;
}

/* GitHub Issues Selection styles */
.github-issues-list {
    background: #2c2c2c;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 1rem;
}

.issue-item {
    display: flex;
    align-items: center;
    padding: 8px;
    margin-bottom: 8px;
    border-radius: 4px;
    background: #363636;
    transition: background-color 0.2s;
}

.issue-item:hover {
    background: #404040;
}

.issue-item input[type="checkbox"] {
    margin-right: 12px;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.issue-item label {
    margin: 0;
    cursor: pointer;
    flex-grow: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.issue-number {
    color: #888;
    font-size: 0.9em;
    margin-left: 8px;
}


/* Timer styles */
.timer { 
    font-size: 1.2rem; 
    font-weight: bold; 
    color: #007bff; 
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background-color: #1e1e1e;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    border: 1px solid #444;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

/* Debug info styles */
.debug-info {
    background-color: #2c2c2c;
    padding: 0.8rem;
    border-radius: 4px;
    margin-top: 0.5rem;
    font-size: 0.85rem;
    border: 1px solid #444;
    color: #e0e0e0;
}

.debug-info:hover {
    border-color: #adb5bd;
}

.debug-info .label {
    font-weight: bold;
    color: #495057;
    min-width: 100px;
    display: inline-block;
}

/* Debug links styles */
.debug-links {
    font-size: 0.85rem;
    display: flex;
    gap: 1rem;
    margin-top: 0.25rem;
}

.debug-links a {
    color: #6c757d;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.debug-links a:hover {
    color: #495057;
}

.debug-links i {
    font-size: 0.9rem;
}

/* Loading animation */
.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loader-content {
    text-align: center;
}

.loader-spinner {
    font-size: 3rem;
    color: #007bff;
    margin-bottom: 1rem;
}

/* Toast styles */
.toast {
    background-color: #2c2c2c;
    border: none;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.5);
    color: #e0e0e0;
}

.toast-header {
    background-color: #1e1e1e;
    border-bottom: 1px solid #444;
    color: #e0e0e0;
}

.toast-body {
    padding: 1rem;
}

.toast-body.success {
    color: #4caf50;
    background-color: rgba(76, 175, 80, 0.2);
}

.toast-body.error {
    color: #f44336;
    background-color: rgba(244, 67, 54, 0.2);
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
    0% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.2); }
    100% { opacity: 1; transform: scale(1); }
}

/* Agent state styles */
.agent-state {
    background-color: #2c2c2c;
    padding: 1rem;
    border-radius: 5px;
    border: 1px solid #444;
    margin-bottom: 1rem;
    color: #e0e0e0;
}

.agent-state > div {
    margin-bottom: 0.5rem;
}

.agent-state > div:last-child {
    margin-bottom: 0;
}

.agent-state strong {
    color: #adb5bd;
    margin-right: 0.5rem;
}

.progress-item {
    color: #28a745;
}

.thought-item {
    color: #17a2b8;
}

.future-item {
    color: #6c757d;
}

.action-item {
    color: #dc3545;
}

/* CLI Output specific styles */
.cli-output {
    background-color: #1e1e1e;
    color: #d4d4d4;
    font-family: 'Consolas', 'Monaco', monospace;
    padding: 10px;
    border-radius: 5px;
    max-height: 400px;
    overflow-y: auto;
    white-space: pre-wrap; /* Ensure text wraps */
    word-wrap: break-word; /* Break long words */
}

.output-container {
    white-space: pre-wrap;
    word-wrap: break-word;
}

.output-line {
    margin: 2px 0;
    line-height: 1.4;
}

.timestamp {
    color: #569cd6;
    margin-right: 8px;
}

.user-message {
    color: #4ec9b0;
    font-weight: bold;
}

/* Scrollbar styles */
.cli-output::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.cli-output::-webkit-scrollbar-track {
    background: #2e2e2e;
    border-radius: 4px;
}

.cli-output::-webkit-scrollbar-thumb {
    background: #666;
    border-radius: 4px;
}

.cli-output::-webkit-scrollbar-thumb:hover {
    background: #888;
}

/* ANSI color classes */
.cli-output .ansi-blue { color: #007bff; } /* OKBLUE */
.cli-output .ansi-cyan { color: #17a2b8; } /* OKCYAN */
.cli-output .ansi-green { color: #28a745; } /* OKGREEN */
.cli-output .ansi-yellow { color: #ffc107; } /* WARNING */
.cli-output .ansi-red { color: #dc3545; } /* FAIL */
.cli-output .ansi-bold { font-weight: bold; } /* BOLD */
.cli-output .ansi-underline { text-decoration: underline; } /* UNDERLINE */

/* User message style */
.cli-output .user-message {
    color: #007bff; /* OKBLUE */
}
