/* 
 * AutoV2 WebView - Terminal Cyberpunk Theme
 * Consolidated CSS file with all styling
 */

:root {
    /* Dark terminal-like backgrounds - much darker */
    --primary-bg: #080808;
    --secondary-bg: #0c0c0c;
    --terminal-bg: #050505;
    --border-color: #1a1a1a;
    --text-primary: #c0c0c0;
    --text-secondary: #909090;
    --text-muted: #555555;
    --highlight-text: #e6e6e6;
    --code-font: 'JetBrains Mono', 'Courier New', monospace;
    
    /* Dark theme with bright accent colors */
    --accent-blue: #56c2ff;
    --accent-green: #56e2c2;
    --accent-red: #ff5e5e;
    --accent-yellow: #e2c070;
    --accent-purple: #d580ff;
    --accent-teal: #40e9d8;
    --accent-orange: #ff8656;
    
    /* Smaller font sizes for more compact look */
    --font-size-xs: 10px;    /* Extra small text (timestamps, very minor details) */
    --font-size-sm: 11px;    /* Small text (secondary information, metadata) */
    --font-size-base: 12px;  /* Base font size for most content */
    --font-size-md: 13px;    /* Medium text (important content, reasoning) */
    --font-size-lg: 14px;    /* Large text (headers, titles) */
    --font-size-xl: 16px;    /* Extra large text (main headers) */
    
    /* Theme-specific layout variables */
    --background-secondary: #0e0e0e;
    --card-background: rgba(18, 18, 18, 0.3);
    --card-highlight: rgba(30, 30, 30, 0.4);
    --mobile-header-height: 45px; /* Added for mobile sticky headers */
    
    /* Error colors */
    --error-bg: rgba(212, 118, 118, 0.08);
}

@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;700&family=VT323&display=swap');

body {
    background-color: var(--primary-bg);
    color: var(--text-primary);
    font-family: var(--code-font);
    font-size: var(--font-size-base);
    overflow-x: hidden;
    text-shadow: 0 0 2px rgba(192, 255, 179, 0.2);
    padding-bottom: 20px;
}

a {
    color: var(--accent-blue);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: var(--accent-green);
    text-decoration: none;
}

/* MOBILE-FIRST BASE LAYOUT */
/* Session container mobile layout (default) */
.session-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    height: auto;
    margin-bottom: 0;
    padding-bottom: 60px;
    position: relative;
    z-index: 1;
}

.main-panel {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 8px;
    height: auto;
    max-height: 100vh; /* Increased from 65vh to make feed box much longer */
    overflow-y: auto;
    order: 1;
}

.sidebar-top {
    width: 100%;
    height: auto;
    max-height: 45vh;
    overflow-y: hidden;
    order: 2;
}

.sidebar-bottom {
    width: 100%;
    height: auto;
    max-height: 60vh;
    overflow-y: hidden;
    order: 3;
}

/* File tree mobile layout */
.file-tree {
    width: 100%;
    height: 40%;
    max-height: 300px;
    border-right: none;
    border-bottom: 1px solid var(--border-color);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.file-preview {
    width: 100%;
    height: 60%;
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
}

.workspace-layout {
    flex-direction: column;
}

/* Index page - sessions grid */
.sessions-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 15px;
}

.session-card {
    width: 100%;
    margin-bottom: 15px;
}

/* Tab bar sticky for mobile */
.tabs-wrapper {
    position: sticky;
    top: 0;
    z-index: 10;
    background-color: var(--terminal-bg);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 10px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 0;
}

/* Terminal effects - these are theme-specific */
.crt-effect {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;  /* Reduced from 10000 to prevent blocking interactions */
    pointer-events: none;
}

.crt-scanline {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: rgba(192, 255, 179, 0.03);
    z-index: 1001;  /* Reduced from 10001 */
    opacity: 0.3;
    animation: scanline 6s linear infinite;
    pointer-events: none;
}

.crt-flicker {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0);
    z-index: 1002;  /* Reduced from 10002 */
    animation: flicker 0.2s infinite;
    pointer-events: none;
    opacity: 0.01;
}

.crt-lines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0) 50%,
        rgba(0, 0, 0, 0.01) 50%
    );
    background-size: 100% 4px;
    z-index: 1003;  /* Reduced from 10003 */
    pointer-events: none;
    opacity: 0.4;
}

/* Terminal scanlines */
.terminal-scanlines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        rgba(192, 255, 179, 0.01) 50%,
        rgba(0, 0, 0, 0.01) 50%
    );
    background-size: 100% 4px;
    z-index: 2000;
    pointer-events: none;
    opacity: 0.06;
}

/* Loading indicator styles */
.loading-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
    gap: 10px;
}

.loading-spinner {
    width: 24px;
    height: 24px;
    border: 2px solid var(--accent-blue);
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Loading placeholder with more general styling */
.loading-placeholder {
    padding: 4px 10px;
    text-align: center;
    color: var(--accent-blue);
    font-size: var(--font-size-xs);
    margin: 4px 0;
    font-style: italic;
    animation: subtle-pulse 1.5s infinite ease-in-out;
    background-color: rgba(123, 195, 201, 0.08);
    border-left: 2px solid var(--accent-blue);
}

/* Directory-specific loading placeholder styles */
.dir-contents .loading-placeholder {
    padding: 3px 8px;
    margin: 2px 0;
    font-size: var(--font-size-xs);
    color: var(--accent-blue);
    background-color: rgba(123, 195, 201, 0.05);
    border-left: 2px solid var(--accent-blue);
    animation: subtle-pulse 2s infinite ease-in-out;
}

.placeholder .error-message {
    max-width: 80%;
    margin: 0 auto 10px;
}

/* Theme-specific text effects - reduced glow */
.terminal-title {
    color: var(--accent-green);
    font-size: var(--font-size-md);
    font-weight: 500;
    text-shadow: 0 0 3px rgba(146, 209, 150, 0.3);
}

.feed-content, .action-params, .step-progress {
    text-shadow: 0 0 1px rgba(146, 209, 150, 0.2);
}

.feed-type {
    color: var(--accent-blue);
    font-size: var(--font-size-sm);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px; /* Reduced from 12px */
}

.action-name {
    text-shadow: 0 0 2px rgba(212, 208, 122, 0.3);
}

.agent-name {
    text-shadow: 0 0 2px rgba(146, 209, 150, 0.3);
}

.service-name {
    text-shadow: 0 0 2px rgba(193, 150, 211, 0.3);
}

/* Terminal container theme-specific styling - removing vertical border */
.terminal-container {
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
    background-color: var(--terminal-bg);
    border: none; /* Removed border for more minimal look */
    padding: 10px;
    margin-bottom: 12px;
    font-family: var(--code-font);
    display: flex;
    flex-direction: column;
    width: 100%; /* Ensure full width */
    box-sizing: border-box; /* Include padding in width calculation */
}

/* Sidebar panel terminal containers need special handling */
.sidebar-top .terminal-container,
.sidebar-bottom .terminal-container {
    height: auto;
    max-height: none;
    overflow: visible;
    display: flex;
    flex-direction: column;
    width: 100%; /* Ensure containers fill sidebar width */
}

.sidebar-top .terminal-container > *:not(.vision-header),
.sidebar-bottom .terminal-container > *:not(.info-header) {
    overflow: visible;
}

.sidebar-top .screenshot-container {
    max-height: 70%;
    overflow: hidden;
}

.sidebar-bottom .meta-section {
    padding-right: 5px;
}

/* DESKTOP LAYOUT - Apply only for larger screens */
@media (min-width: 769px) {
    /* Session container desktop layout */
    .session-container {
        display: grid;
        grid-template-columns: 1fr 300px;
        grid-template-rows: min-content 1fr;
        gap: 15px;
        height: calc(100vh - 80px);
        margin-bottom: -60px;
        width: calc(100% - 30px); /* Add fixed width to ensure alignment */
        margin-left: auto;
        margin-right: auto;
        max-width: 1600px; /* Add max-width to prevent extreme stretching */
    }

    .main-panel {
        grid-column: 1;
        grid-row: 1 / span 2;
        height: 100%;
        overflow: auto;
        order: unset;
    }

    .sidebar-top {
        grid-column: 2;
        grid-row: 1;
        height: auto;
        max-height: none;
        overflow: visible;
        order: unset;
        width: 300px; /* Fixed width to ensure alignment */
    }

    .sidebar-bottom {
        grid-column: 2;
        grid-row: 2;
        height: auto;
        min-height: auto;
        max-height: none;
        overflow-y: auto;
        order: unset;
        width: 300px; /* Fixed width to ensure alignment */
    }

    /* File tree desktop layout */
    .file-tree {
        width: 25%;
        height: auto;
        border-right: 1px solid var(--border-color);
        border-bottom: none;
    }

    .workspace-layout {
        flex-direction: row;
        height: 100%;
    }

    /* File preview section needs to fill available space */
    .file-preview {
        height: 100%;
    }
    
    .file-preview-content {
        flex: 1;
        overflow-y: auto;
        max-height: none;
    }

    /* Session cards for desktop */
    .session-card {
        width: calc(33.3% - 15px);
        margin-bottom: 20px;
    }
}

/* Media queries for responsive layout - using consistent 768px breakpoint */
@media (max-width: 768px) {
    .main-panel, .sidebar-top, .sidebar-bottom {
        grid-column: auto;
        grid-row: auto;
        width: 100%;
    }
    
    .main-panel {
        height: auto;
        max-height: 65vh;
        overflow-y: auto;
        order: 1;
    }
    
    .sidebar-top {
        height: auto;
        order: 2;
    }
    
    .sidebar-bottom {
        height: auto;
        max-height: none;
        overflow-y: visible;
        order: 3;
    }
    
    .terminal-container {
        padding: 8px;
        height: auto;
        max-height: none;
    }
    
    .screenshot-container {
        max-height: 30vh;
    }
    
    #feed-container {
        max-height: 60vh;
        overflow-y: auto;
        padding-bottom: 30px;
    }
    
    /* Stats container for mobile */
    .stats-container {
        grid-template-columns: 1fr;
    }
    
    .beta-warning-banner {
        padding: 3px 10px; /* Reduced horizontal padding to save space */
        font-size: 9px;
        line-height: 1.3; /* Slightly increased for better readability */
    }
    
    .beta-warning-content {
        display: block; /* Simple block layout for natural text flow */
        text-align: center; /* Keep text centered */
        line-height: 1.3; /* Comfortable line height */
        word-wrap: break-word; /* Allow long words to break if needed */
        overflow-wrap: break-word; /* Modern syntax for word wrapping */
    }
    
    .terminal-footer {
        padding: 1px 8px;
        font-size: 7px;
    }
    
    .footer-content {
        gap: 3px;
    }
    
    .footer-link {
        font-size: 7px;
    }
    
    .footer-separator {
        font-size: 6px;
        margin: 0 1px;
    }
    
    .footer-center-text {
        font-size: 6px;
    }
}

/* Animation keyframes - all animations defined in one place */
@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: .6; }
    50% { transform: scale(1.4); opacity: 1; }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

@keyframes scanline {
    0% { top: -100px; }
    100% { top: 100%; }
}

@keyframes flicker {
    0% { opacity: 0.01; }
    50% { opacity: 0.02; }
    100% { opacity: 0.01; }
}

@keyframes pulse-glow {
    0% { text-shadow: 0 0 3px rgba(146, 209, 150, 0.3); }
    50% { text-shadow: 0 0 7px rgba(146, 209, 150, 0.5); }
    100% { text-shadow: 0 0 3px rgba(146, 209, 150, 0.3); }
}

@keyframes subtle-pulse {
    0% { opacity: 0.6; }
    50% { opacity: 1; }
    100% { opacity: 0.6; }
}

/* Event and action styling - properly formatted */
.event-action {
    margin: 3px 0;  /* Reduced from 6px */
    padding: 3px 4px; /* Reduced from 6px 8px */
    border-left: 2px solid var(--accent-blue);
    background: transparent;
    border-radius: 0;
}

.event-action-header {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 0 0 2px 0; /* Reduced from 0 0 4px 0 */
    background: none;
    border: none;
}

.event-action-service,
.event-action-name {
    padding: 0 4px;
    background: none; /* remove pill background */
    border: none;     /* remove pill border */
    font-size: var(--font-size-sm);
}

.event-action-service {
    color: var(--accent-purple);
    font-weight: 500;
}

.event-action-name {
    color: var(--accent-orange);
    font-weight: 500;
}

.event-action-separator {
    margin: 0 4px;
    color: var(--text-muted);
}

/* Remove pre wrapper from action params for cleaner display */
.event-action-params {
    padding: 0;
    margin: 0;
}

/* Keep the rest of your theme styles below */
/* Heading theme-specific styling */
h1, h2, h3, h4, h5, h6 {
    color: var(--accent-green);
    font-family: var(--code-font);
    font-weight: normal;
    margin-top: 0.6rem;
    margin-bottom: 0.6rem;
    text-shadow: 0 0 3px rgba(146, 209, 150, 0.3);
}

h1::before, h2::before, h3::before, h4::before, h5::before, h6::before {
    content: "> ";
    color: var(--accent-green);
}

/* Action tag styling */
.action-tag {
    display: inline-block;
    font-family: var(--code-font);
    font-size: var(--font-size-xs);
    color: var(--accent-blue);
    background-color: rgba(123, 195, 201, 0.08);
    border: 1px solid rgba(123, 195, 201, 0.15);
    padding: 1px 6px;
    margin: 1px 2px;
    white-space: nowrap;
}

.service-tag {
    display: inline-block;
    font-family: var(--code-font);
    font-size: var(--font-size-xs);
    color: var(--accent-purple);
    background-color: rgba(193, 150, 211, 0.08);
    border: 1px solid rgba(193, 150, 211, 0.15);
    padding: 1px 6px;
    margin: 1px 2px;
    white-space: nowrap;
}

.action-tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
    margin-top: 3px;
    margin-bottom: 5px;
}

/* Custom action styling for feed */
.feed-action {
    background-color: rgba(123, 195, 201, 0.05);
    border-left: 2px solid var(--accent-blue);
    padding: 4px 8px;
    margin: 4px 0;
}

.feed-service {
    color: var(--accent-purple);
    font-weight: 500;
    font-size: var(--font-size-xs);
    margin-left: 4px;
    padding: 0 4px;
    background-color: rgba(193, 150, 211, 0.08);
    border: 1px solid rgba(193, 150, 211, 0.15);
}

/* Status badge styles */
.status-running {
    color: var(--accent-blue);
}

.status-completed {
    color: var(--accent-green);
}

.status-failed {
    color: var(--accent-red);
}

/* Actions list styling */
.actions-list {
    margin-top: 6px;
    padding-left: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.action-item {
    margin-bottom: 6px;
    font-size: var(--font-size-sm);
    padding: 3px 0;
    border-left: 2px solid var(--accent-orange);
    padding-left: 8px;
    background-color: rgba(255, 150, 75, 0.05);
}

.action-name {
    color: var(--accent-orange);
    font-weight: 500;
}

.action-service {
    margin-left: 6px;
    color: var(--accent-purple);
    font-size: var(--font-size-xs);
    background-color: rgba(193, 150, 211, 0.08);
    border: 1px solid rgba(193, 150, 211, 0.15);
    padding: 0 4px;
}

.action-params {
    margin-top: 8px;
    padding: 10px 12px;
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
    font-family: var(--code-font);
    white-space: pre-wrap;
    word-break: break-word;
    max-height: 400px;
    overflow-y: auto;
    overflow-x: auto;
    line-height: 1.5;
    background-color: rgba(30, 35, 40, 0.3);
    border-left: 2px solid var(--accent-blue);
}

/* Service styling in feed */
.service-section {
    margin-bottom: 8px;
}

.service-header {
    color: var(--accent-purple);
    font-size: var(--font-size-sm);
    font-weight: 500;
    margin-bottom: 4px;
    padding: 2px 0;
    border-bottom: 1px dotted rgba(193, 150, 211, 0.3);
}

/* Page domain display - removed border */
.page-domain {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    padding: 6px 10px;
    margin-top: 5px;
    font-family: var(--code-font);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    background-color: rgba(30, 35, 40, 0.4);
}

.domain-icon {
    margin-right: 6px;
    color: var(--accent-blue);
    font-size: 12px;
}

/* Metadata section styling */
.metadata-grid {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 6px 8px; /* Reduced from 8px 10px */
    font-size: var(--font-size-sm);
    margin-bottom: 6px;
}

.metadata-grid .meta-label {
    border-left: none;
    padding-left: 0;
    margin-bottom: 0;
    color: var(--text-muted);
    font-weight: normal;
    display: block;
}

.meta-label {
    color: var(--text-muted);
}

.meta-value {
    color: var(--text-primary);
    text-align: right;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.meta-section {
    margin-bottom: 16px;
    padding-top: 10px;
}

.meta-section + .meta-section {
    border-top: 1px dotted var(--border-color);
    padding-top: 16px;
}

.meta-section-title {
    color: var(--text-muted);
    margin-bottom: 6px;
    font-size: var(--font-size-sm);
    font-weight: 500;
}

.meta-section-title::before {
    content: "";
}

/* Feed styling */
.feed-container {
    display: flex;
    flex-direction: column;
    gap: 4px; /* Reduced from 8px */
    padding: 8px 0; /* Reduced from 16px 0 */
}

.feed-item {
    background-color: var(--item-bg);
    border-radius: 6px;
    padding: 6px; /* Reduced from 12px */
    margin-bottom: 4px; /* Reduced from 8px */
    border-left: 3px solid var(--accent-blue);
    transition: box-shadow 0.2s ease;
}

.feed-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.feed-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 4px; /* Reduced from 8px */
    font-size: var(--font-size-sm);
}

.feed-time {
    color: var(--text-muted);
    font-family: var(--code-font);
}

.feed-content {
    padding: 4px 0; /* Reduced from 8px 0 */
    line-height: 1.4;
}

/* Tab styles */
.tab-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding: 0;
}

.tab-buttons {
    display: flex;
}

.tab-button {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-family: var(--code-font);
    font-size: var(--font-size-sm);
    padding: 8px 15px;
    cursor: pointer;
    text-transform: uppercase;
    border-bottom: 2px solid transparent;
    position: relative;
}

.tab-button:hover {
    color: var(--text-primary);
}

.tab-button.active {
    color: var(--accent-green);
    border-bottom-color: var(--accent-green);
}

.tab-button .pulse-dot {
    margin-left: 5px;
}

.tab-panel {
    display: none;
    height: 100%;
    padding-top: 0;
}

.tab-panel.active {
    display: block;
}

/* Workspace layout */
.workspace-container {
    height: 100%;
    overflow: hidden;
}

.workspace-layout {
    display: flex;
    height: 100%;
}

/* File tree */
.file-tree-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    border-bottom: 1px solid var(--border-color);
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
}

.file-tree-content {
    flex: 1;
    overflow-y: auto;
    padding: 5px 0;
    transition: opacity 0.2s ease;
}

.file-tree-content.loading {
    opacity: 0.7;
}

.file-item {
    display: flex;
    align-items: center;
    padding: 4px 8px;
    cursor: pointer;
    font-size: var(--font-size-sm);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-item:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.file-item.active {
    background-color: rgba(121, 192, 255, 0.1);
    border-left: 2px solid var(--accent-blue);
}

.file-item-icon {
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-right: 12px; /* Increased spacing to prevent overlap */
    color: var(--text-accent);
    vertical-align: middle;
    text-align: center;
    flex-shrink: 0; /* Prevent icon from shrinking */
}

.file-item-name {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dir-toggle {
    margin-right: 5px;
    cursor: pointer;
    transition: transform 0.2s;
    display: inline-block;
    width: 12px;
    text-align: center;
    color: var(--accent-green);
}

.dir-toggle.open {
    transform: rotate(90deg);
}

.dir-contents {
    margin-left: 15px;
    display: none;
    transition: all 0.3s ease;
}

.dir-contents.open {
    display: block;
    animation: fade-in 0.3s ease;
}

/* File preview */
.file-preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    border-bottom: 1px solid var(--border-color);
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
}

.file-preview-content {
    flex: 1;
    overflow-y: auto;
    padding: 10px 15px;
    font-family: var(--code-font);
    font-size: var(--font-size-sm);
    position: relative;
    color: var(--text-primary);
    line-height: 1.5;
}

.file-preview-content pre {
    margin: 0;
}

.file-preview-content code {
    background-color: rgba(80, 80, 80, 0.3);
    padding: 2px 4px;
    font-family: var(--code-font);
}

/* Task styling */
.task-title {
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 2px;
    font-size: var(--font-size-sm);
}

.task-description {
    color: var(--text-primary);
    font-size: var(--font-size-sm);
    margin-top: 6px;
    white-space: pre-wrap;
    word-break: break-word;
    line-height: 1.5;
}

.task-current {
    margin-top: 10px;
    padding: 8px 12px;
    background-color: rgba(108, 169, 247, 0.08);
    border-left: 2px solid var(--accent-blue);
    font-size: var(--font-size-sm);
}

.current-label {
    color: var(--text-muted);
    font-size: var(--font-size-xs);
    margin-right: 6px;
}

#current-task-text {
    color: var(--accent-blue);
}

/* Screenshot container styling */
.screenshot-container {
    width: 100%;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    background-color: var(--terminal-bg);
    border: 1px solid var(--border-color);
    margin-bottom: 10px;
    min-height: auto;
    max-height: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.screenshot {
    width: 100%;
    display: block;
    max-height: none;
    object-fit: contain;
}

/* Fullscreen container */
.fullscreen-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    display: none;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.fullscreen-container.active {
    display: flex;
}

.fullscreen-content {
    max-width: 95%;
    max-height: 95%;
    position: relative;
}

.fullscreen-img {
    max-width: 100%;
    max-height: 95vh;
    border: none;
}

.fullscreen-close {
    position: absolute;
    top: -40px;
    right: 0;
    color: white;
    background: none;
    border: none;
    font-size: var(--font-size-lg);
    cursor: pointer;
    padding: 8px 12px;
}

/* Fix for the fullscreen button in vision header */
#fullscreen-btn {
    color: var(--accent-blue);
    font-size: var(--font-size-md);
    padding: 4px 8px;
    background: none;
    border: none;
    cursor: pointer;
    transition: color 0.2s;
}

#fullscreen-btn:hover {
    color: var(--accent-green);
}

/* Placeholder styling */
.placeholder {
    padding: 20px;
    text-align: center;
    color: var(--text-secondary);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    font-size: var(--font-size-sm);
    background-color: var(--background-secondary);
}

/* Terminal header styling for container elements */
.terminal-container .terminal-header {
    border-bottom: 1px dotted var(--border-color);
    padding-bottom: 2px;
    margin-bottom: 2px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex: 0 0 auto;
}

.terminal-container .terminal-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Remove the ">" prefix from terminal title */
.terminal-title::before {
    content: none;
    display: none;
}

/* Add an exception to preserve the arrow for the INFO and VISION sections */
.sidebar-top .terminal-title::before,
.sidebar-bottom .terminal-title::before {
    content: "> ";
    display: inline;
    color: var(--accent-green);
}

/* Terminal controls styling */
.terminal-controls {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* Vision header styles */
.vision-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px dotted var(--border-color);
    padding-bottom: 2px;
    margin-bottom: 2px;
}

.vision-title {
    color: var(--accent-green);
    font-size: var(--font-size-md);
    font-weight: 500;
}

.vision-title::before {
    content: "> ";
    color: var(--accent-green);
}

/* Info header styles */
.info-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px dotted var(--border-color);
    padding-bottom: 2px;
    margin-bottom: 2px;
}

.info-title {
    color: var(--accent-green);
    font-size: var(--font-size-md);
    font-weight: 500;
}

.info-title::before {
    content: "> ";
    color: var(--accent-green);
}

/* File content styling */
.file-content {
    white-space: pre-wrap;
    font-family: var(--code-font);
    line-height: 1.5;
    tab-size: 4;
    background-color: var(--background-secondary);
    padding: 10px;
    margin: 6px 0;
    max-height: none;
    overflow-y: auto;
    overflow-x: auto;
    font-size: var(--font-size-sm);
    width: 100%;
}

/* Code content styling */
.code-content {
    font-family: var(--code-font);
    font-size: var(--font-size-sm);
    line-height: 1.5;
    white-space: pre-wrap;
    background-color: var(--terminal-bg);
    padding: 15px;
    color: var(--text-secondary);
    tab-size: 4;
    width: 100%;
    overflow-x: auto;
    max-height: none;
}

.terminal-output {
    font-family: var(--code-font);
    font-size: var(--font-size-sm);
    line-height: 1.5;
    white-space: pre-wrap;
    background-color: transparent;
    padding: 0;
    color: var(--text-secondary);
    overflow-x: auto;
    width: 100%;
}

/* Error section styling - removed border */
.error-section {
    margin-top: 10px;
    padding: 10px;
    background-color: rgba(212, 118, 118, 0.08);
}

.error-header {
    font-weight: bold;
    color: var(--accent-red);
    font-size: var(--font-size-sm);
    margin-bottom: 6px;
}

.error-message {
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
    font-family: var(--code-font);
    white-space: pre-wrap;
    word-break: break-all;
    overflow-x: auto;
    line-height: 1.5;
    max-height: 400px;
    overflow-y: auto;
}

.error-message-content {
    margin-left: 12px;
    padding: 6px 0;
    color: var(--text-secondary);
}

.traceback-section {
    font-size: var(--font-size-xs);
    color: var(--text-muted);
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px dotted rgba(212, 118, 118, 0.2);
}

.traceback-toggle {
    font-size: var(--font-size-xs);
    color: var(--accent-blue);
    background: none;
    border: none;
    border-left: 2px solid var(--accent-blue);
    padding: 3px 10px;
    cursor: pointer;
    margin-top: 5px;
    font-family: var(--code-font);
}

.traceback-toggle:hover {
    background-color: rgba(123, 195, 201, 0.1);
}

.traceback-content {
    display: none;
    margin-top: 8px;
    padding: 8px;
    background-color: var(--background-secondary);
    border-left: 2px solid var(--accent-yellow);
    font-family: var(--code-font);
    white-space: pre-wrap;
    word-break: break-all;
    font-size: var(--font-size-xs);
    line-height: 1.5;
    color: var(--text-muted);
    max-height: 300px;
    overflow-y: auto;
}

/* Agent and service styling */
.agent-item {
    padding: 8px 10px;
    margin-bottom: 8px;
    font-size: var(--font-size-sm);
    background-color: rgba(123, 195, 201, 0.08);
    transition: background-color 0.2s;
    border-left: 2px solid var(--accent-blue);
    box-sizing: border-box;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.agent-item:hover {
    background-color: rgba(123, 195, 201, 0.12);
}

/* Remove badge and use colored text instead */
.agent-role {
    color: var(--accent-blue);
    font-weight: 500;
    font-size: var(--font-size-sm);
    margin: 0;
    padding: 0;
}

.agent-info-row {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    margin-bottom: 2px;
    gap: 2px;
}

.agent-name {
    font-weight: 500;
    font-size: var(--font-size-sm);
    color: var(--text-primary);
    width: auto;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.agent-type {
    font-size: var(--font-size-xs);
    color: var(--text-secondary);
    margin-bottom: 0;
    margin-top: 1px;
    width: 100%;
}

.agent-model {
    font-size: var(--font-size-xs);
    color: var(--accent-teal);
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    width: 100%;
    margin-top: 2px;
}

.agent-list {
    margin-top: 6px;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Services styling - removed border */
.service-tile {
    background-color: rgba(40, 45, 50, 0.2);
    padding: 6px 12px;
    border-radius: 0;
    transition: background-color 0.2s;
    font-size: var(--font-size-sm);
    display: inline-block;
    min-width: 90px;
    text-align: center;
    position: relative;
    margin: 0 4px 4px 0;
}

.service-tile:hover {
    background-color: rgba(40, 45, 50, 0.3);
}

.service-name {
    color: var(--accent-purple);
    font-weight: 500;
    white-space: nowrap;
    font-family: var(--code-font);
    letter-spacing: 0.5px;
}

/* Agent styles for JavaScript generated content */
.agent-item-generated {
    border-left: 2px solid var(--accent-blue);
    background-color: rgba(123, 195, 201, 0.08);
    padding: 8px 10px;
    margin-bottom: 8px;
    transition: background-color 0.2s;
}

.agent-name-generated {
    color: var(--accent-blue);
    font-weight: 500;
    display: block;
    margin-bottom: 3px;
}

.agent-type-generated {
    color: var(--text-muted);
    font-style: italic;
    font-size: var(--font-size-sm);
}

.agent-model-generated {
    color: var(--accent-teal);
    font-weight: 500;
    font-size: var(--font-size-sm);
}

.agent-id-generated {
    font-size: var(--font-size-sm);
    color: var(--text-muted);
    margin-top: 3px;
}

/* Step task and progress */
.step-task {
    color: var(--accent-green);
    font-weight: 500;
    margin-bottom: 4px;
    font-size: var(--font-size-md);
}

.step-progress {
    color: var(--text-secondary);
    font-size: var(--font-size-base);
    margin-bottom: 6px;
}

/* Status update styles */
.status-update {
    color: var(--text-primary);
    font-size: var(--font-size-base);
}

.status-value {
    color: var(--accent-blue);
    font-weight: 500;
}

.previous-status {
    color: var(--text-muted);
}

/* Plan content */
.plan-content {
    white-space: pre-wrap;
    color: var(--accent-blue);
    font-family: var(--code-font);
    font-size: var(--font-size-md);
    padding: 8px 12px;
    background: rgba(123, 195, 201, 0.08);
    line-height: 1.5;
}

/* CSV table styling */
.csv-table-container {
    width: 100%;
    overflow-x: auto;
    max-height: none;
}

.csv-table {
    border-collapse: collapse;
    width: 100%;
    font-size: var(--font-size-xs);
    overflow: auto;
}

.csv-table th {
    background-color: rgba(80, 80, 80, 0.3);
    color: var(--accent-blue);
    text-align: left;
    padding: 6px 8px;
    border: 1px solid var(--border-color);
}

.csv-table td {
    padding: 4px 8px;
    border: 1px solid var(--border-color);
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.csv-table tr:nth-child(even) {
    background-color: rgba(80, 80, 80, 0.1);
}

/* Keep language-specific syntax highlighting tints */
.code-js { border-left: 2px solid var(--accent-yellow); }
.code-py { border-left: 2px solid var(--accent-blue); }
.code-java { border-left: 2px solid var(--accent-orange); }
.code-c, .code-cpp { border-left: 2px solid var(--accent-purple); }
.code-html { border-left: 2px solid var(--accent-red); }
.code-css { border-left: 2px solid var(--accent-blue); }
.code-json { border-left: 2px solid var(--accent-yellow); }
.code-xml { border-left: 2px solid var(--accent-green); }
.code-sh, .code-bash { border-left: 2px solid var(--accent-teal); }

/* Utility classes for common styles */
.hidden {
    display: none;
}

.text-xs {
    font-size: var(--font-size-xs);
}

.text-sm {
    font-size: var(--font-size-sm);
}

.text-base {
    font-size: var(--font-size-base);
}

.text-md {
    font-size: var(--font-size-md);
}

.text-primary {
    color: var(--text-primary);
}

.text-secondary {
    color: var(--text-secondary);
}

.text-muted {
    color: var(--text-muted);
}

.text-accent-blue {
    color: var(--accent-blue);
}

.text-accent-green {
    color: var(--accent-green);
}

.text-accent-red {
    color: var(--accent-red);
}

.text-accent-yellow {
    color: var(--accent-yellow);
}

.text-accent-purple {
    color: var(--accent-purple);
}

.text-accent-teal {
    color: var(--accent-teal);
}

.font-bold {
    font-weight: bold;
}

.font-normal {
    font-weight: normal;
}

.font-italic {
    font-style: italic;
}

.flex-row {
    display: flex;
    flex-direction: row;
}

.flex-col {
    display: flex;
    flex-direction: column;
}

.justify-between {
    justify-content: space-between;
}

.items-center {
    align-items: center;
}

.gap-2 {
    gap: 2px;
}

.gap-4 {
    gap: 4px;
}

.gap-8 {
    gap: 8px;
}

.mt-2 {
    margin-top: 2px;
}

.mt-4 {
    margin-top: 4px;
}

.mb-2 {
    margin-bottom: 2px;
}

.mb-4 {
    margin-bottom: 4px;
}

.mb-6 {
    margin-bottom: 6px;
}

.p-2 {
    padding: 2px;
}

.p-4 {
    padding: 4px;
}

.p-8 {
    padding: 8px;
}

.py-4 {
    padding-top: 4px;
    padding-bottom: 4px;
}

.px-8 {
    padding-left: 8px;
    padding-right: 8px;
}

.w-full {
    width: 100%;
}

.h-full {
    height: 100%;
}

.overflow-hidden {
    overflow: hidden;
}

.overflow-auto {
    overflow: auto;
}

.whitespace-nowrap {
    white-space: nowrap;
}

.whitespace-pre-wrap {
    white-space: pre-wrap;
}

.truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.animate-pulse {
    animation: pulse 2s infinite;
}

.animate-glow {
    animation: pulse-glow 2s ease-out;
}

.hover-highlight:hover {
    background-color: rgba(0, 255, 0, 0.05);
}

/* Hide any dynamically added debug elements showing dimensions */
[id="div.terminal-header"],
div[id*="terminal-header"]:not(.terminal-container .terminal-header),
div[class*="debug"],
div[class*="inspector"] {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
    width: 0 !important;
    height: 0 !important;
}

/* Remove any element showing dimensions like 722×36.5 */
*:not(code):not(pre) {
    content: normal !important;
}

/* Agent and Services containers */
#agents-container {
    min-height: auto;
    max-height: none;
    overflow: visible;
    margin-bottom: 10px;
}

#services-container {
    min-height: auto;
    max-height: none;
    overflow: visible;
}

.pulse-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent-green);
    animation: pulse 1.5s infinite ease-in-out;
}

/* Session-specific styles integrated from session.css */
.info-section {
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
}

.info-section h3 {
    margin-top: 0;
    margin-bottom: 10px;
    color: var(--accent-green);
    font-size: var(--font-size-lg);
}

.info-content {
    padding-left: 10px;
}

.info-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
    font-size: var(--font-size-sm);
}

.info-label {
    color: var(--text-muted);
}

.info-value {
    color: var(--text-primary);
    font-weight: 500;
}

.info-value.highlight {
    color: var(--accent-green);
    font-weight: bold;
}

.info-subheader {
    margin-top: 10px;
    margin-bottom: 5px;
    font-size: var(--font-size-sm);
    color: var(--accent-blue);
    border-bottom: 1px dotted var(--border-color);
}

#session-duration {
    color: var(--accent-green);
    font-weight: bold;
}

/* Stats Tab Styles */
#stats-tab {
    padding: 15px;
}

.stats-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.stats-box {
    background-color: var(--secondary-bg);
    border: 1px solid var(--border-color);
    border-radius: 0;
    padding: 15px;
}

.stats-box h3 {
    margin-top: 0;
    color: var(--accent-green);
    font-size: var(--font-size-lg);
    margin-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 5px;
}

/* LLM Request Entry Styles */
.llm-request-entry {
    background-color: var(--secondary-bg);
    border-left: 2px solid var(--border-color);
    border-radius: 0;
    padding: 10px;
    margin-bottom: 10px;
}

.llm-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 5px;
}

.model-name {
    font-weight: bold;
    color: var(--accent-blue);
}

.llm-status {
    padding: 2px 6px;
    font-weight: bold;
}

.success-status {
    color: var(--accent-green);
}

.error-status {
    color: var(--accent-red);
}

.llm-details {
    font-size: var(--font-size-sm);
    color: var(--text-primary);
}

.llm-purpose, .llm-component {
    margin-bottom: 5px;
}

.llm-metrics {
    display: flex;
    flex-wrap: wrap;
    margin-top: 8px;
    gap: 10px;
}

.llm-tokens, .llm-cost, .llm-duration {
    padding: 2px 6px;
    background-color: var(--terminal-bg);
}

.llm-cost {
    color: var(--accent-green);
}

.provider-badge {
    display: inline-block;
    padding: 1px 5px;
    margin-left: 5px;
    font-size: var(--font-size-xs);
    background-color: var(--secondary-bg);
}

.provider-badge.openai {
    background-color: #10a37f;
    color: white;
}

.provider-badge.anthropic {
    background-color: #d22e2e;
    color: white;
}

.provider-badge.google {
    background-color: #4285F4;
    color: white;
}

.provider-badge.meta {
    background-color: #0668E1;
    color: white;
}

.provider-badge.unknown {
    background-color: #555;
    color: white;
}

/* Chart and Stats Tab Styles */
.stats-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: var(--font-size-sm);
}

.stats-label {
    color: var(--text-muted);
}

.stats-value {
    color: var(--text-primary);
    font-weight: 500;
}

.stats-value.highlight {
    color: var(--accent-green);
    font-weight: bold;
}

.stats-subheader {
    margin-top: 15px;
    margin-bottom: 10px;
    font-size: var(--font-size-md);
    color: var(--accent-blue);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 3px;
}

.chart-item {
    margin-bottom: 8px;
}

.chart-label {
    color: var(--text-secondary);
    margin-bottom: 3px;
    font-size: var(--font-size-sm);
}

.chart-bar-container {
    display: flex;
    align-items: center;
    height: 20px;
}

.chart-bar {
    height: 16px;
    background-color: var(--accent-blue);
    border-radius: 0;
}

.chart-value {
    margin-left: 8px;
    color: var(--text-primary);
    font-size: var(--font-size-sm);
}

.model-item {
    display: block;
    background-color: var(--secondary-bg);
    padding: 8px;
    border-left: 2px solid var(--accent-blue);
    margin-bottom: 10px;
}

.model-name {
    font-weight: bold;
    color: var(--accent-blue);
    margin-bottom: 6px;
    font-size: var(--font-size-sm);
    padding-left: 2px;
}

.model-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding-left: 2px;
}

.model-stat {
    font-size: var(--font-size-sm);
    background-color: transparent;
    padding: 0;
    border-radius: 0;
}

.stat-label {
    color: var(--text-muted);
    margin-right: 4px;
}

.stat-value {
    color: var(--text-primary);
}

.loading-message {
    color: var(--text-muted);
    font-style: italic;
    padding: 10px 0;
}

/* Global header styling */
.global-header {
    background-color: var(--terminal-bg);
    color: var(--text-primary);
    padding: 8px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 15px;
}

.terminal-brand {
    color: var(--accent-green);
    font-weight: 600;
    font-size: var(--font-size-lg);
    text-transform: uppercase;
    font-family: 'VT323', monospace;
    letter-spacing: 1px;
}

.terminal-nav {
    display: flex;
    gap: 15px;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s;
}

.nav-link:hover {
    color: var(--accent-blue);
}

/* Feed styling for various event types */
.event-icon {
    margin-right: 5px;
    font-size: var(--font-size-md);
    display: inline-block;
}

.event-step {
    color: var(--accent-blue);
    font-weight: 500;
    margin-bottom: 5px;
}

.event-model {
    color: var(--accent-purple);
    font-size: var(--font-size-sm);
    margin-bottom: 5px;
}

.event-purpose {
    color: var(--text-secondary);
    font-style: italic;
    margin-bottom: 3px;
}

.event-tokens {
    color: var(--accent-green);
    font-size: var(--font-size-sm);
    font-family: var(--code-font);
}

.event-cost {
    color: var(--accent-orange);
    font-size: var(--font-size-sm);
    font-family: var(--code-font);
}

.event-actions {
    margin-top: 5px;
    padding: 5px 0;
}

.event-actions-header {
    color: var(--text-muted);
    font-size: var(--font-size-xs);
    margin-bottom: 2px; /* Reduced from default */
    padding: 0;
}

.event-actions-list {
    display: flex;
    flex-direction: column;
    gap: 2px;  /* Reduced spacing between actions */
}

.event-progress {
    margin-top: 5px;
    color: var(--text-secondary);
    font-style: italic;
}

.event-status-value {
    font-weight: 500;
}

.event-previous-status {
    color: var(--text-muted);
    font-size: var(--font-size-sm);
    margin-top: 3px;
}

.event-task {
    color: var(--accent-green);
    font-weight: 500;
    margin-bottom: 5px;
}

.event-agent-id,
.event-agent-name {
    color: var(--accent-blue);
    font-weight: 500;
}

.event-agent-type {
    color: var(--text-secondary);
    font-style: italic;
    font-size: var(--font-size-sm);
}

.event-agent-model {
    color: var(--accent-purple);
    font-size: var(--font-size-sm);
    margin-left: 8px;
}

.event-agent-count,
.event-orchestrator {
    margin-bottom: 5px;
}

.event-agents {
    margin-top: 8px;
}

.event-agents-header,
.event-components-header,
.event-eval-header {
    color: var(--text-muted);
    font-size: var(--font-size-sm);
    margin-bottom: 5px;
}

.event-agents-list {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.event-agent {
    background-color: rgba(123, 195, 201, 0.05);
    border-left: 2px solid var(--accent-blue);
    padding: 3px 8px;
    font-size: var(--font-size-sm);
}

.event-components {
    margin-top: 8px;
}

.event-components-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 5px;
}

.event-component {
    background-color: rgba(193, 150, 211, 0.05);
    border-left: 2px solid var(--accent-purple);
    padding: 3px 8px;
    font-size: var(--font-size-xs);
    display: flex;
    justify-content: space-between;
}

.event-component-value {
    color: var(--accent-green);
}

.event-assessment {
    font-weight: 500;
    color: var(--accent-green);
    margin-bottom: 8px;
}

.event-eval-section {
    margin-top: 5px;
}

.event-eval-list {
    margin: 0;
    padding-left: 20px;
    font-size: var(--font-size-sm);
}

.event-eval-list li {
    margin-bottom: 3px;
}

/* Params header in action parameters */
.params-header {
    padding-bottom: 10px;
    margin-bottom: 10px;
    border-bottom: 1px dotted var(--border-color);
    color: var(--accent-green);
    font-size: var(--font-size-sm);
}

/* Parameter table styling */
.params-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
    background-color: rgba(20, 25, 30, 0.4);
    font-family: var(--code-font);
    font-size: var(--font-size-sm);
}

.params-table tr {
    border-bottom: 1px solid rgba(60, 70, 80, 0.2);
}

.params-table tr:last-child {
    border-bottom: none;
}

.params-table td {
    padding: 2px 4px; /* Further reduced from 3px 5px */
    vertical-align: top;
}

.param-name {
    color: var(--accent-blue);
    width: 25%;
    white-space: nowrap;
    font-weight: 500;
}

.param-value {
    color: var(--text-secondary);
    word-break: break-word;
}

.param-value.file-path {
    color: var(--accent-green);
    font-family: var(--code-font);
}

/* Limit width of parameter values to avoid unreasonable stretching */
.params-table .param-value {
    max-width: 400px;
    word-break: break-word;
    white-space: pre-wrap;
    font-size: var(--font-size-xs); /* Smaller font size */
    line-height: 1.3; /* Tighter line height */
}

/* URL preview in action params */
.url-preview {
    margin-top: 2px; /* Reduced from 6px */
    padding: 0; /* Removed padding */
    background-color: transparent; /* Removed background */
    border-left: none; /* Removed border */
    max-width: 100%;
    overflow-wrap: break-word;
    font-size: var(--font-size-xs); /* Smaller font */
    line-height: 1.3; /* Tighter line height */
}

.url-preview a {
    color: var(--accent-blue);
    word-break: break-all;
    text-decoration: none;
    max-width: 100%;
    display: inline-block;
    font-size: var(--font-size-xs); /* Smaller font */
}

.url-preview a:hover {
    color: var(--accent-green);
    text-decoration: underline;
}

.param-summary {
    margin: 8px 0; /* Reduced from 10px */
    padding: 6px 10px; /* Reduced from 8px 12px */
    color: var(--text-muted);
    font-size: var(--font-size-xs);
    font-style: italic;
    background-color: rgba(30, 35, 40, 0.3);
    border-left: 2px solid var(--accent-blue);
}

.json-value {
    margin: 0;
    padding: 4px; /* Reduced from 5px */
    white-space: pre-wrap;
    background-color: rgba(20, 25, 30, 0.3);
    border-radius: 3px;
    max-height: 200px;
    overflow-y: auto;
    font-size: var(--font-size-xs); /* Smaller font */
    line-height: 1.3; /* Tighter line height */
}

.file-content-header {
    padding: 8px 10px;
    color: var(--accent-blue);
    font-weight: 500;
    background-color: rgba(30, 35, 40, 0.6);
    border-top: 1px solid var(--border-color);
}

.event-next-goal {
    color: var(--accent-green);
    font-style: italic;
    margin-bottom: 6px;
}

/* Minimal single-line LLM request entry */
.feed-llm-line {
    padding: 0; /* remove extra spacing */
}

.feed-llm-line .feed-type {
    /* Override base feed-type styles for minimal appearance */
    font-size: var(--font-size-xs);
    font-weight: normal;
    color: var(--text-muted);
    font-family: var(--code-font);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    opacity: 0.7; /* make it less prominent */
}

/* Hide icon and timestamp for ultra-compact display */
.feed-llm-line .event-icon,
.feed-llm-line .feed-time {
    display: none;
}

/* Container tweaks for minimal footprint */
.feed-llm-item {
    padding: 2px 6px;
    background: transparent;
    border-left: none;
    margin-bottom: 2px;
}

/* Actions table styles */
.actions-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    font-size: var(--font-size-sm);
}

.actions-table th, 
.actions-table td {
    padding: 6px 10px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.actions-table th {
    background-color: rgba(30, 35, 40, 0.4);
    color: var(--accent-blue);
    font-weight: 500;
}

.actions-table tr:hover {
    background-color: rgba(30, 35, 40, 0.2);
}

.mini-bar-container {
    width: 100%;
    background-color: rgba(30, 35, 40, 0.3);
    height: 16px;
    position: relative;
    border-radius: 3px;
    overflow: hidden;
    display: flex;
    align-items: center;
}

.mini-bar {
    height: 100%;
    background-color: var(--accent-blue);
    position: absolute;
    left: 0;
    top: 0;
}

.mini-bar-text {
    position: relative;
    z-index: 1;
    margin-left: 5px;
    font-size: var(--font-size-xs);
    color: var(--text-primary);
}

/* URL styling within content */
.content-url {
    color: var(--accent-blue);
    text-decoration: none;
    transition: color 0.2s;
    word-break: break-word;
    display: inline;
    background-color: transparent;
    padding: 0;
    border-bottom: none;
    pointer-events: auto !important;
    cursor: pointer !important;
    line-height: inherit;
    vertical-align: baseline;
    margin: 0;
    white-space: normal;
}

.content-url:hover {
    color: var(--accent-green);
    text-decoration: underline;
}

/* Ensure links in code blocks are clickable and flow naturally */
.file-content a.content-url,
code a.content-url,
pre a.content-url,
.file-content-text a.content-url {
    pointer-events: auto !important;
    cursor: pointer !important;
    position: relative;
    z-index: 10;
    display: inline;
    word-break: break-word;
    line-height: inherit;
    vertical-align: baseline;
    margin: 0;
    padding: 0;
}

/* Mobile-specific fixes for URL display */
@media (max-width: 768px) {
    .content-url {
        word-break: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
        display: inline;
        white-space: normal;
        line-height: inherit;
        vertical-align: baseline;
    }
    
    .file-content-text {
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
}

/* Specific styling for URL/open_tab actions */
.event-action-url {
    background-color: transparent;
    border-left: none;
    margin: 2px 0;
    padding: 0;
}

.event-action-url .params-table {
    background-color: transparent;
    margin: 0;
}

.event-action-url .param-name {
    width: 15%;
    min-width: 40px;
}

/* Fix for the link preview box - make it more compact */
.event-action-url .param-value.url-value {
    padding: 0;
    background-color: transparent;
    line-height: 1.2;
    max-width: 100%;
}

/* Compact URL display for open_tab actions */
.compact-url {
    font-family: var(--code-font);
    padding: 0;
    margin: 0;
    background-color: transparent;
    border-left: none;
    font-size: var(--font-size-xs);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
    max-height: 1.5em;
}

.compact-url a {
    color: var(--accent-blue);
    text-decoration: none;
    transition: color 0.2s;
    word-break: normal;
    max-width: 100%;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
}

.compact-url a:hover {
    color: var(--accent-green);
    text-decoration: underline;
}

/* Step error styling */
.event-error {
    margin-top: 5px;
    margin-bottom: 8px;
    background-color: var(--error-bg);
    border-left: 2px solid var(--accent-red);
    padding: 6px 10px;
}

.event-error-header {
    color: var(--accent-red);
    font-weight: 500;
    font-size: var(--font-size-sm);
    margin-bottom: 4px;
}

.event-error-content {
    color: var(--text-primary);
    font-size: var(--font-size-sm);
}

.event-error-item {
    margin-bottom: 3px;
    font-family: var(--code-font);
    white-space: pre-wrap;
    word-break: break-word;
}

.event-no-actions {
    color: var(--text-muted);
    font-style: italic;
    padding: 4px 0;
}

/* Add proper URL styling to URL display */
.url {
    font-family: var(--code-font);
    display: inline-block;
    padding: 0;
    margin: 0;
    background-color: transparent;
    color: var(--accent-blue);
    border-left: none;
}

/* Add file extension as a data attribute and display it via tooltip */
.file-item:hover::after {
    content: attr(data-ext);
    position: absolute;
    background-color: var(--secondary-bg);
    color: var(--text-secondary);
    font-size: var(--font-size-xs);
    padding: 2px 6px;
    border-radius: 3px;
    right: 10px;
    opacity: 0.8;
}

.param-value.url-value {
    max-width: 100%;
    width: 100%;
    overflow-wrap: break-word;
    word-break: break-all;
    padding: 0;
    background-color: transparent;
    border-left: none;
    line-height: 1.2;
    font-size: var(--font-size-xs);
}

.param-value.url-value a {
    color: var(--accent-blue);
    text-decoration: none;
    word-break: break-all;
    overflow-wrap: break-word;
    max-width: 100%;
    white-space: normal;
    display: inline-block;
    font-size: var(--font-size-xs);
}

.param-value.url-value a:hover {
    color: var(--accent-green);
    text-decoration: underline;
}

/* Beta Warning Banner */
.beta-warning-banner {
    background: rgba(40, 45, 50, 0.8);
    color: var(--text-secondary);
    padding: 4px 20px;
    text-align: center;
    font-size: 10px;
    font-weight: 400;
    border-bottom: 1px solid var(--border-color);
    box-shadow: none;
    animation: none;
    line-height: 1.3;
}

.beta-warning-content {
    max-width: 1200px;
    margin: 0 auto;
    display: block;
    text-align: center;
    line-height: 1.3;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.beta-warning-content a {
    color: var(--accent-blue);
    text-decoration: none;
    font-weight: 400;
    transition: color 0.2s ease;
}

.beta-warning-content a:hover {
    color: var(--accent-green);
    text-decoration: underline;
}

/* Terminal Footer */
.terminal-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(40, 45, 50, 0.8);
    color: var(--text-secondary);
    padding: 2px 15px;
    text-align: center;
    font-size: 8px;
    font-weight: 400;
    border-top: 1px solid var(--border-color);
    box-shadow: none;
    line-height: 1.2;
    z-index: 100;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    flex-wrap: wrap;
    text-align: center;
}

.footer-link {
    color: #666666;
    text-decoration: none;
    font-weight: 400;
    transition: color 0.2s ease;
}

.footer-link:hover {
    color: var(--accent-blue);
    text-decoration: none;
}

.footer-link[href="https://theselfrule.org"]:hover {
    color: var(--accent-yellow);
}

.footer-separator {
    color: #666666;
    margin: 0 2px;
}

.footer-center-text {
    color: #666666;
    font-size: 7px;
} 