/* ===== CSS RESET & BASE STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 14px;
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow: hidden;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    touch-action: manipulation;
}

/* ===== CSS VARIABLES ===== */
:root {
    /* Colors - Dark Theme (Default) */
    --bg-primary: #1e1e1e;
    --bg-secondary: #2d2d30;
    --bg-tertiary: #3e3e42;
    --bg-hover: #404040;
    --bg-active: #4a90e2;
    --bg-success: #16825d;
    --bg-warning: #f9a825;
    --bg-danger: #f44336;
    
    --text-primary: #cccccc;
    --text-secondary: #9ca3af;
    --text-muted: #6b7280;
    --text-inverse: #1e1e1e;
    
    --border-color: #484848;
    --border-hover: #6b7280;
    --border-focus: #0078d4;
    
    --accent-primary: #5ba0f2;
    --accent-primary-rgb: 91, 160, 242;
    --accent-secondary: #106ebe;
    --accent-success: #16a085;
    --accent-warning: #f39c12;
    --accent-danger: #e74c3c;
    
    /* Icon colors - Dark theme uses white icons */
    --icon-filter: invert(1) brightness(1);
    
    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-xxl: 3rem;
    
    /* Typography */
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-md: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-xxl: 1.5rem;
    
    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;
    
    /* Layout */
    --header-height: 60px;
    --sidebar-width: 300px;
    --sidebar-collapsed-width: 60px;
    
    /* Borders & Radius */
    --border-radius-sm: 4px;
    --border-radius-md: 6px;
    --border-radius-lg: 8px;
    --border-radius-xl: 12px;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.15);
    
    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.25s ease;
    --transition-slow: 0.4s ease;
    
    /* Z-index layers */
    --z-base: 0;
    --z-dropdown: 100;
    --z-sticky: 200;
    --z-fixed: 300;
    --z-modal-backdrop: 10100;
    --z-modal: 10200;
    --z-notification: 600;
    --z-tooltip: 700;
}

/* Theme Loading State - Optimized for light theme compatibility */
.theme-loading {
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-tertiary: #e9ecef;
    --bg-hover: #f1f3f4;
    --bg-active: #64b5f6;
    
    --text-primary: #212529;
    --text-secondary: #495057;
    --text-muted: #6c757d;
    --text-inverse: #ffffff;
    
    --border-color: #dee2e6;
    --border-hover: #adb5bd;
    --border-focus: #0078d4;
    
    --accent-primary: #64b5f6;
    --accent-primary-rgb: 100, 181, 246;
    --accent-secondary: #1565c0;
    
    /* Light theme compatible icon colors */
    --icon-filter: invert(0) brightness(0.2);
}

/* Light Theme Variables */
.theme-light {
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-tertiary: #e9ecef;
    --bg-hover: #f1f3f4;
    --bg-active: #64b5f6;
    
    --text-primary: #212529;
    --text-secondary: #495057;
    --text-muted: #6c757d;
    --text-inverse: #ffffff;
    
    --border-color: #dee2e6;
    --border-hover: #adb5bd;
    --border-focus: #0078d4;
    
    --accent-primary: #64b5f6;
    --accent-primary-rgb: 100, 181, 246;
    --accent-secondary: #1565c0;
    
    /* Icon colors - Light theme uses dark icons */
    --icon-filter: invert(0) brightness(0.2);
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
}

/* ===== ICON COLOR SYSTEM ===== */
.icon,
img[src*="assets/icons/"]:not([src*="favicon"]):not([src*=".png"]) {
    filter: var(--icon-filter);
    transition: filter var(--transition-fast);
}

/* Favicon and PNG icons should maintain original appearance */
img[src*="favicon"],
img[src*="assets/icons/"][src*=".png"] {
    filter: none !important;
}

/* ===== LOADING SCREEN ===== */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: var(--z-modal);
    transition: opacity var(--transition-slow);
    overflow: hidden;
}

.loading-content {
    text-align: center;
    max-width: 500px;
    animation: fadeInUp 0.8s ease-out;
}

.loading-logo-container {
    position: relative;
    width: 200px;
    height: 200px;
    margin: 0 auto 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.loading-logo {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    z-index: 2;
    position: relative;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
}

.loading-logo:hover {
    transform: scale(1.05) rotate(5deg);
    filter: drop-shadow(0 8px 16px rgba(var(--accent-primary-rgb, 75, 160, 242), 0.3));
}

.loading-spinner-modern {
    position: absolute;
    top: 0;
    left: 0;
    width: 200px;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.spinner-ring {
    position: absolute;
    border-radius: 50%;
    border: 3px solid transparent;
}

.spinner-ring:nth-child(1) {
    width: 200px;
    height: 200px;
    border-top: 3px solid var(--accent-primary);
    border-right: 3px solid var(--accent-primary);
    animation: spinClockwise 2s linear infinite;
    opacity: 0.8;
}

.spinner-ring:nth-child(2) {
    width: 170px;
    height: 170px;
    border-bottom: 3px solid var(--accent-secondary);
    border-left: 3px solid var(--accent-secondary);
    animation: spinCounterClockwise 1.5s linear infinite;
    opacity: 0.6;
}

.spinner-ring:nth-child(3) {
    width: 140px;
    height: 140px;
    border-top: 3px solid var(--text-muted);
    border-right: 3px solid var(--text-muted);
    animation: spinClockwise 1s linear infinite;
    opacity: 0.4;
}

.loading-title {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
    letter-spacing: 0.05em;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    animation: titleFloat 3s ease-in-out infinite alternate;
}

.loading-subtitle {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 1.4rem;
    color: var(--text-secondary);
    font-weight: 500;
    opacity: 0.9;
    animation: pulse 2s ease-in-out infinite;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-color);
    border-top: 3px solid var(--accent-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto var(--spacing-lg);
}

.loading-spinner.small {
    width: 20px;
    height: 20px;
    border-width: 2px;
}

/* Light theme specific adjustments */
.theme-light .loading-logo {
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.08));
}

.theme-light .loading-logo:hover {
    filter: drop-shadow(0 8px 16px rgba(var(--accent-primary-rgb, 100, 181, 246), 0.25));
}

/* Light theme welcome screen adjustments */
.theme-light .welcome-screen::before {
    background-image: 
        linear-gradient(90deg, rgba(0,0,0,0.02) 1px, transparent 1px),
        linear-gradient(rgba(0,0,0,0.02) 1px, transparent 1px);
}

/* Responsive design for loading screen */
@media (max-width: 768px) {
    .loading-title {
        font-size: 2rem;
    }
    
    .loading-subtitle {
        font-size: 1.2rem;
    }
    
    .loading-logo-container {
        width: 160px;
        height: 160px;
    }
    
    .loading-logo {
        width: 110px;
        height: 110px;
        filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
    }
    
    .loading-spinner-modern {
        width: 160px;
        height: 160px;
    }
    
    .spinner-ring:nth-child(1) {
        width: 160px;
        height: 160px;
    }
    
    .spinner-ring:nth-child(2) {
        width: 135px;
        height: 135px;
    }
    
    .spinner-ring:nth-child(3) {
        width: 110px;
        height: 110px;
    }
}

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

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

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

@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes titleFloat {
    0% {
        transform: translateY(0px);
        opacity: 0.9;
    }
    100% {
        transform: translateY(-5px);
        opacity: 1;
    }
}

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

/* ===== APP LAYOUT ===== */
.app-container {
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.app-header {
    height: var(--header-height);
    background-color: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    padding: 0 var(--spacing-md);
    position: relative;
    z-index: var(--z-sticky);
    flex-shrink: 0;
}

.app-body {
    flex: 1;
    display: flex;
    overflow: hidden;
}

/* ===== HEADER COMPONENTS ===== */
.header-left,
.header-center,
.header-right {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.header-left {
    flex: 0 0 auto;
}

.header-center {
    flex: 1;
    justify-content: center;
    max-width: 600px;
    margin: 0 auto;
}

.header-right {
    flex: 0 0 auto;
    margin-left: auto;
}

.app-title {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-semibold);
    color: var(--text-primary);
}

.app-title .icon {
    font-size: var(--font-size-xl);
}

/* Make the logo circular */
.app-title img.icon {
    border-radius: 50%;
    object-fit: cover;
}

.title-text {
    white-space: nowrap;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    font-size: var(--font-size-md);
    color: var(--text-secondary);
}

.breadcrumb-item {
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--border-radius-sm);
    transition: background-color var(--transition-fast);
}

.breadcrumb-item.active {
    background-color: var(--bg-hover);
    color: var(--text-primary);
}


.status-indicators {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.status-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    font-size: var(--font-size-md);
    color: var(--text-secondary);
}

.indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--accent-danger);
    animation: pulse 2s infinite;
}

.indicator.online {
    background-color: var(--accent-success);
    animation: none;
}

.indicator.offline {
    background-color: var(--accent-danger);
}

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

.header-actions {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none !important;
    background-color: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    padding: var(--spacing-sm);
    margin-right: var(--spacing-sm);
}

.mobile-menu-toggle:hover {
    background-color: var(--bg-hover);
}

/* Mobile Backdrop */
.mobile-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: calc(var(--z-fixed) - 1);
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.mobile-backdrop.active {
    opacity: 1;
}

/* ===== SIDEBAR ===== */
.sidebar {
    width: var(--sidebar-width);
    background-color: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    flex-shrink: 0;
    transition: width var(--transition-normal);
    position: relative;
}

.sidebar.collapsed {
    width: var(--sidebar-collapsed-width);
}

.sidebar-panel {
    border-bottom: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    min-height: 100px;
    overflow: hidden;
}

.sidebar-panel:first-child {
    flex: 0 0 250px; /* Default height for projects panel */
}

.sidebar-panel:last-child {
    border-bottom: none;
    flex: 1;
    min-height: 150px;
}

.panel-header {
    padding: 0 var(--spacing-md);
    height: 40px; /* Match terminal-header height */
    background-color: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

/* Add space for collapse button in first panel */
.sidebar-panel:first-of-type .panel-header {
    position: relative;
}

.sidebar-panel:first-of-type .panel-header #new-project-btn {
    margin-right: 30px; /* Space for collapse button */
}

.panel-header h3 {
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-semibold);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
}

.panel-content {
    padding: var(--spacing-sm);
    flex: 1;
    overflow: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--border-color) transparent;
}

/* Panel Content Scrollbar Styling - Dark Theme */
.panel-content::-webkit-scrollbar {
    width: 8px;
}

.panel-content::-webkit-scrollbar-track {
    background: transparent;
    border-radius: 4px;
}

.panel-content::-webkit-scrollbar-thumb {
    background-color: var(--border-color);
    border-radius: 4px;
    transition: background-color var(--transition-fast);
}

.panel-content::-webkit-scrollbar-thumb:hover {
    background-color: var(--border-hover);
}

/* Light Theme Scrollbar Override */
.theme-light .panel-content {
    scrollbar-color: rgba(0, 0, 0, 0.2) transparent;
}

.theme-light .panel-content::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.2);
}

.theme-light .panel-content::-webkit-scrollbar-thumb:hover {
    background-color: rgba(0, 0, 0, 0.3);
}

.project-search {
    margin-bottom: var(--spacing-sm);
}

.project-search input {
    width: 100%;
    padding: var(--spacing-sm);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-size: var(--font-size-xs);
}

.project-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

.project-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: var(--spacing-sm);
    border-radius: var(--border-radius-sm);
    transition: background-color var(--transition-fast);
    border: 1px solid transparent;
    position: relative;
}

.project-item:hover {
    background-color: var(--bg-hover);
}

.project-item.active {
    background-color: var(--bg-active);
    border-color: var(--accent-primary);
}

.project-content {
    flex: 1;
    cursor: pointer;
    min-width: 0; /* Allow content to shrink */
}

.project-name {
    font-weight: var(--font-weight-medium);
    color: var(--text-primary);
    font-size: var(--font-size-md);
    margin-bottom: var(--spacing-xs);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.project-meta {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
}

.project-date {
    font-size: var(--font-size-xs);
    color: var(--text-secondary);
    font-weight: var(--font-weight-normal);
}

.project-options-container {
    position: relative;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
}

.project-options-btn {
    opacity: 0.6;
    transition: opacity var(--transition-fast);
    background-color: var(--bg-tertiary);
    color: var(--text-secondary);
    border: 1px solid transparent;
    flex-shrink: 0;
}

.project-item:hover .project-options-btn {
    opacity: 1;
}

.project-options-btn:hover {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    border-color: var(--border-subtle);
}

.project-create-vscode-btn {
    opacity: 0.6;
    transition: opacity var(--transition-fast);
    background-color: var(--bg-tertiary);
    color: var(--text-secondary);
    border: 1px solid transparent;
    flex-shrink: 0;
}

.project-item:hover .project-create-vscode-btn {
    opacity: 1;
}

.project-create-vscode-btn:hover {
    background-color: var(--accent-primary);
    color: var(--text-primary);
    border-color: var(--accent-secondary);
}

.project-create-terminal-btn {
    opacity: 0.6;
    transition: opacity var(--transition-fast);
    background-color: var(--bg-tertiary);
    color: var(--text-secondary);
    border: 1px solid transparent;
    flex-shrink: 0;
}

.project-item:hover .project-create-terminal-btn {
    opacity: 1;
}

.project-create-terminal-btn:hover {
    background-color: var(--accent-primary);
    color: var(--text-primary);
    border-color: var(--accent-secondary);
}

.project-options-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background-color: var(--bg-primary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-medium);
    z-index: 1000;
    min-width: 160px;
    overflow: hidden;
}

.project-options-dropdown .dropdown-item {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    cursor: pointer;
    transition: background-color var(--transition-fast);
    border-bottom: 1px solid var(--border-subtle);
}

.project-options-dropdown .dropdown-item:last-child {
    border-bottom: none;
}

.project-options-dropdown .dropdown-item:hover {
    background-color: var(--bg-secondary);
}

.project-options-dropdown .dropdown-item[data-action="delete"]:hover {
    background-color: var(--accent-danger);
    color: var(--text-inverse);
}

.project-options-dropdown .dropdown-item .text {
    font-size: 13px;
    font-weight: 400;
}


/* ===== SIDEBAR DIVIDER ===== */
.sidebar-divider {
    height: 6px;
    background-color: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    position: relative;
    cursor: ns-resize;
    user-select: none;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color var(--transition-fast);
    flex-shrink: 0;
}

.sidebar-divider:hover {
    background-color: var(--bg-hover);
}

.sidebar-divider:active {
    background-color: var(--accent-primary);
}

.sidebar-divider-handle {
    width: 40px;
    height: 3px;
    background-color: var(--border-color);
    border-radius: 2px;
    transition: background-color var(--transition-fast);
}

.sidebar-divider:hover .sidebar-divider-handle {
    background-color: var(--text-secondary);
}

.sidebar-divider:active .sidebar-divider-handle {
    background-color: var(--text-inverse);
}

.sidebar-divider.dragging {
    background-color: var(--accent-primary);
}

.sidebar-divider.dragging .sidebar-divider-handle {
    background-color: var(--text-inverse);
}

/* ===== VERTICAL DIVIDER ===== */
.vertical-divider {
    width: 6px;
    background-color: var(--bg-secondary);
    border-left: 1px solid var(--border-color);
    border-right: 1px solid var(--border-color);
    position: relative;
    cursor: ew-resize;
    user-select: none;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color var(--transition-fast);
    flex-shrink: 0;
}

.vertical-divider:hover {
    background-color: var(--bg-hover);
}

.vertical-divider:active {
    background-color: var(--accent-primary);
}

.vertical-divider-handle {
    width: 3px;
    height: 40px;
    background-color: var(--border-color);
    border-radius: 2px;
    transition: background-color var(--transition-fast);
}

.vertical-divider:hover .vertical-divider-handle {
    background-color: var(--text-secondary);
}

.vertical-divider:active .vertical-divider-handle {
    background-color: var(--text-inverse);
}

.vertical-divider.dragging {
    background-color: var(--accent-primary);
}

.vertical-divider.dragging .vertical-divider-handle {
    background-color: var(--text-inverse);
}



/* ===== MAIN CONTENT ===== */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

.terminal-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background-color: var(--bg-primary);
}

.terminal-header {
    background-color: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--spacing-md);
    height: 40px;
    flex-shrink: 0;
}

.terminal-tabs {
    display: flex;
    align-items: center;
    gap: 2px;
    flex: 1;
    /* Mobile terminal tabs horizontal scrolling support */
    overflow-x: auto;
    overflow-y: hidden;
    flex-wrap: nowrap;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    /* Hide scrollbar on desktop while keeping functionality */
    scrollbar-width: thin;
    scrollbar-color: var(--border-color) transparent;
}

.terminal-tab {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: var(--spacing-xs) var(--spacing-sm);
    background: none;
    border: none;
    border-radius: var(--border-radius-sm);
    color: var(--text-secondary);
    cursor: pointer;
    font-size: var(--font-size-md);
    transition: all var(--transition-fast);
    /* Prevent tab shrinking and ensure minimum readable width */
    min-width: 120px;
    max-width: 200px;
    flex-shrink: 0;
    white-space: nowrap;
}

.terminal-tab .tab-title {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-right: var(--spacing-xs);
}

.terminal-tab:hover {
    background-color: var(--bg-hover);
    color: var(--text-primary);
}

.terminal-tab.active {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    border-bottom: 2px solid var(--accent-primary);
}

.terminal-tab .close-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 2px;
    border-radius: 2px;
    font-size: 10px;
    transition: color var(--transition-fast);
}

.terminal-tab .close-btn:hover {
    color: var(--accent-danger);
    background-color: var(--bg-hover);
}

.terminal-controls {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
}

/* Terminal tabs scrollbar styling for Webkit browsers */
.terminal-tabs::-webkit-scrollbar {
    height: 4px;
}

.terminal-tabs::-webkit-scrollbar-track {
    background: transparent;
}

.terminal-tabs::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 2px;
    opacity: 0.6;
}

.terminal-tabs::-webkit-scrollbar-thumb:hover {
    background: var(--border-hover);
    opacity: 0.8;
}

.terminal-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    background-color: #1e1e1e; /* Terminal background */
    min-height: 0; /* Ensure flex item can shrink */
}

/* ===== WELCOME SCREEN ===== */
/* ===== WELCOME SCREEN - BLACK & WHITE PIXEL ART STYLE ===== */
.welcome-screen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-primary);
    z-index: 9999;
    overflow: hidden;
}

/* Pixel grid background effect */
.welcome-screen::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px),
        linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px);
    background-size: 20px 20px;
    pointer-events: none;
    z-index: -1;
}

.welcome-content {
    text-align: center;
    max-width: 700px;
    padding: 3rem;
    animation: welcomeFadeIn 1s ease-out;
}

/* Brand Section */
.brand-section {
    margin-bottom: 2.5rem;
}

.logo-container {
    margin-bottom: 1.5rem;
}

.brand-logo {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    filter: 
        drop-shadow(0 4px 8px rgba(255, 255, 255, 0.2))
        contrast(1.3)
        brightness(1.1);
    transition: transform 0.3s ease;
}

.brand-logo:hover {
    transform: scale(1.05) rotate(5deg);
    filter: 
        drop-shadow(0 6px 12px rgba(255, 255, 255, 0.3))
        contrast(1.4)
        brightness(1.2);
}

/* Black & White Pixel Art Title */
.brand-title.pixel-art-bw {
    font-family: 'Monaco', 'Menlo', 'Courier New', monospace;
    font-weight: bold;
    font-size: 2.5rem;
    letter-spacing: 0.15em;
    color: #FFFFFF;
    text-shadow: 
        2px 2px 0px #808080,
        4px 4px 0px #404040,
        6px 6px 0px rgba(0,0,0,0.5);
    margin-bottom: 0.8rem;
    -webkit-font-smoothing: none;
    -moz-osx-font-smoothing: unset;
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.3));
}

.brand-subtitle {
    color: #CCCCCC;
    font-size: 1.1rem;
    font-weight: 500;
    font-style: italic;
    margin-bottom: 0;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

/* Value Section */
.value-section {
    margin-bottom: 2.5rem;
}

.value-description {
    color: #B8B8B8;
    font-size: 1.2rem;
    line-height: 1.6;
    max-width: 500px;
    margin: 0 auto;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

/* Action Section */
.action-section {
    margin-top: 2rem;
}

/* Black & White Pixel Button */
.pixel-button-bw {
    background: linear-gradient(135deg, #FFFFFF 0%, #F0F0F0 100%);
    border: 3px solid #000000;
    color: #000000;
    font-family: 'Monaco', 'Menlo', 'Courier New', monospace;
    font-weight: bold;
    font-size: 1.1rem;
    padding: 1rem 2.5rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 
        0 4px 0 #808080,
        0 8px 15px rgba(0,0,0,0.4);
    -webkit-font-smoothing: none;
    -moz-osx-font-smoothing: unset;
    border-radius: 0;
}

.pixel-button-bw:hover {
    background: linear-gradient(135deg, #000000 0%, #333333 100%);
    color: #FFFFFF;
    border-color: #FFFFFF;
    transform: translateY(-2px);
    box-shadow: 
        0 6px 0 #606060,
        0 12px 20px rgba(255,255,255,0.2);
}

.pixel-button-bw:active {
    transform: translateY(2px);
    box-shadow: 
        0 2px 0 #606060,
        0 4px 8px rgba(0,0,0,0.4);
}

.button-icon {
    margin-right: 0.5rem;
    font-size: 1.2em;
}

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

/* Legacy welcome actions for compatibility */
.welcome-actions {
    display: flex;
    gap: var(--spacing-md);
    justify-content: center;
}


/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1200px) {
    :root {
        --sidebar-width: 250px;
    }
}

@media (max-width: 1024px) {
    .header-center {
        display: none;
    }
    
    :root {
        --sidebar-width: 200px;
    }
}

@media (max-width: 768px) {
    :root {
        --sidebar-width: 0;
        --header-height: 50px;
        --spacing-touch: 44px; /* Minimum touch target size */
    }
    
    /* Show mobile menu toggle */
    .mobile-menu-toggle {
        display: flex !important;
    }
    
    /* Mobile backdrop */
    .mobile-backdrop {
        display: block;
        pointer-events: none;
    }
    
    .mobile-backdrop.active {
        pointer-events: auto;
    }
    
    /* Hide vertical divider on mobile */
    .vertical-divider {
        display: none;
    }
    
    /* Sidebar as overlay */
    .sidebar {
        position: fixed;
        left: -280px;
        top: 0;
        height: 100%;
        width: 280px;
        z-index: var(--z-fixed);
        transition: left var(--transition-normal);
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.2);
    }
    
    .sidebar.open {
        left: 0;
    }
    
    /* Adjust app body */
    .app-body {
        margin-left: 0 !important;
    }
    
    .app-title .title-text {
        display: none;
    }
    
    .status-indicators {
        display: flex;
        align-items: center;
        gap: var(--spacing-xs);
        overflow: hidden;
        flex-wrap: nowrap;
    }
    
    .status-indicators .status-item {
        font-size: var(--font-size-xs);
        gap: 2px;
        white-space: nowrap;
    }
    
    .status-indicators .status-item .icon {
        font-size: 12px;
    }
    
    .status-indicators .status-item .text {
        font-size: var(--font-size-xs);
    }
    
    /* Hide less important status items on mobile to save space */
    .status-indicators #system-temp,
    .status-indicators #notification-toggle {
        display: none;
    }
    
    .welcome-actions {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
    }
    
    .welcome-actions .btn {
        width: 100%;
    }
    
    /* Terminal adjustments */
    .terminal-header {
        padding: 0 var(--spacing-sm);
    }
    
    .terminal-tab {
        padding: var(--spacing-xs) var(--spacing-xs);
        font-size: var(--font-size-xs);
        /* Mobile horizontal scrolling optimizations */
        min-width: 100px;
        max-width: 150px;
        flex-shrink: 0;
    }
    
    .terminal-tab .tab-title {
        margin-right: calc(var(--spacing-xs) / 2);
    }
    
    /* Enhanced mobile scrollbar visibility */
    .terminal-tabs::-webkit-scrollbar {
        height: 6px;
    }
    
    .terminal-tabs::-webkit-scrollbar-thumb {
        background: var(--accent-primary);
        opacity: 0.8;
    }
    
    /* Larger touch targets */
    .btn {
        min-height: var(--spacing-touch);
        padding: var(--spacing-sm) var(--spacing-md);
    }
    
    .btn-icon {
        min-width: var(--spacing-touch);
        min-height: var(--spacing-touch);
    }
    
    /* Compact New Terminal button for mobile */
    #new-terminal-btn {
        min-height: 32px;
        padding: var(--spacing-xs) var(--spacing-sm);
        font-size: var(--font-size-xs);
        flex-shrink: 0;
    }
    
    /* Project items larger for touch */
    .project-item {
        padding: var(--spacing-md);
        min-height: var(--spacing-touch);
    }
    
    /* Header adjustments */
    .header-right {
        gap: var(--spacing-xs);
    }
    
    .breadcrumb {
        display: none;
    }
    
    /* Welcome Screen Responsive */
    .brand-title.pixel-art-bw {
        font-size: 1.8rem;
        letter-spacing: 0.1em;
    }
    
    .welcome-content {
        padding: 2rem 1rem;
        max-width: 90%;
    }
    
    .value-description {
        font-size: 1rem;
    }
    
    .pixel-button-bw {
        font-size: 1rem;
        padding: 0.8rem 2rem;
    }
}

@media (max-width: 480px) {
    :root {
        --spacing-md: 0.75rem;
        --spacing-lg: 1rem;
        --font-size-base: 16px; /* Prevent zoom on iOS */
    }
    
    .app-header {
        padding: 0 var(--spacing-xs);
    }
    
    .header-actions {
        gap: 0;
    }
    
    .header-actions .btn-icon {
        padding: var(--spacing-xs);
    }
    
    /* Ultra compact New Terminal button for very small screens */
    #new-terminal-btn {
        min-height: 28px;
        padding: var(--spacing-xs) var(--spacing-xs);
        font-size: 0.65rem;
        max-width: 80px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    
    .welcome-content {
        padding: var(--spacing-md);
    }
    
    .welcome-content h2 {
        font-size: var(--font-size-xl);
    }
    
    /* Even larger touch targets on small screens */
    input, textarea, select {
        font-size: 16px; /* Prevents zoom on iOS */
        min-height: var(--spacing-touch);
    }
    
    /* Sidebar full width on small screens */
    .sidebar {
        width: 100%;
        left: -100%;
    }
    
    /* Terminal optimizations */
    .terminal-content {
        font-size: 14px;
    }
    
    
    /* Further optimize status indicators for very small screens */
    .status-indicators {
        gap: 2px;
    }
    
    .status-indicators .status-item {
        font-size: 10px;
    }
    
    .status-indicators .status-item .icon {
        font-size: 10px;
    }
    
    /* Hide memory status on very small screens, keep only connection and CPU */
    .status-indicators #system-memory {
        display: none;
    }
}

/* ===== MOBILE-SPECIFIC OPTIMIZATIONS ===== */
/* Prevent text selection on interactive elements */
@media (pointer: coarse) {
    button, .btn, .project-item, .terminal-tab {
        -webkit-user-select: none;
        user-select: none;
    }
}

/* Smooth scrolling on mobile */
@media (max-width: 768px) {
    .panel-content, .terminal-content, .modal-body {
        -webkit-overflow-scrolling: touch;
        scroll-behavior: smooth;
    }
}

/* ===== TERMINAL EMPTY STATE STYLES ===== */
.terminal-empty-state {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: var(--bg-primary);
    color: var(--text-primary);
}

.terminal-empty-content {
    text-align: center;
    padding: 3rem 2rem;
    max-width: 500px;
    margin: 0 auto;
}

.terminal-empty-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    opacity: 0.6;
}

.terminal-empty-title {
    font-size: var(--font-size-xxl);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
    letter-spacing: 0.02em;
}

.terminal-empty-description {
    font-size: var(--font-size-md);
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 2rem;
}

/* Terminal Empty State Instructions */
.terminal-empty-instructions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    max-width: 500px;
    margin: 0 auto;
}

.instruction-step {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 2rem;
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    min-width: 450px;
}

.step-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: var(--primary-color);
    border-radius: 50%;
    opacity: 0.9;
}

.step-icon img {
    filter: brightness(0) invert(1);
}

.step-action {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: var(--font-size-md);
    color: var(--text-primary);
    font-weight: 500;
    line-height: 1.4;
}

.step-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-xs);
    min-width: 28px;
    min-height: 28px;
    border-radius: var(--border-radius-sm);
    background-color: var(--bg-tertiary);
    color: var(--text-secondary);
    border: 1px solid transparent;
    opacity: 0.8;
    transition: all var(--transition-fast);
}

.step-button:hover {
    opacity: 1;
    background-color: var(--accent-primary);
    color: var(--text-primary);
    border-color: var(--accent-secondary);
}

.step-button-icon {
    width: 14px;
    height: 14px;
}

.step-location {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    font-weight: 400;
    line-height: 1.3;
    white-space: nowrap;
}

/* Removed instruction-arrow styles */

.instruction-hint {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: var(--font-size-sm);
    color: var(--text-tertiary);
    text-align: center;
}

.hint-icon {
    font-size: 1.1em;
}

.hint-icon-svg {
    width: 16px;
    height: 16px;
    opacity: 0.7;
}

@keyframes instruction-pulse {
    0%, 100% { opacity: 0.6; transform: rotate(-45deg) translateY(0); }
    50% { opacity: 0.9; transform: rotate(-45deg) translateY(-2px); }
}

/* ===== TERMINAL LOADING STATE STYLES ===== */
.terminal-loading-state {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: var(--bg-primary);
    color: var(--text-primary);
}

.terminal-loading-content {
    text-align: center;
    padding: 3rem 2rem;
    max-width: 500px;
    margin: 0 auto;
}

.terminal-loading-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    opacity: 0.6;
}

.terminal-loading-title {
    font-size: var(--font-size-xxl);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
    letter-spacing: 0.02em;
}

.terminal-loading-description {
    font-size: var(--font-size-md);
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 2rem;
}

.loading-spinner {
    margin: 0 auto;
    width: 40px;
    height: 40px;
    border: 4px solid var(--border-color);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Mobile responsive */
@media (max-width: 768px) {
    .terminal-empty-content {
        padding: 2rem 1rem;
    }
    
    .terminal-empty-icon {
        margin-bottom: 1rem;
    }
    
    .terminal-empty-icon img {
        width: 48px !important;
        height: 48px !important;
    }
    
    .terminal-empty-title {
        font-size: var(--font-size-xl);
    }
    
    .terminal-empty-description {
        font-size: var(--font-size-sm);
        margin-bottom: 1.5rem;
    }
    
    .terminal-empty-instructions {
        gap: 1rem;
        max-width: 90%;
    }
    
    .instruction-step {
        padding: 0.8rem 1rem;
        gap: 0.8rem;
        min-width: auto;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .step-icon {
        width: 28px;
        height: 28px;
    }
    
    .step-icon img {
        width: 16px !important;
        height: 16px !important;
    }
    
    .step-text {
        font-size: var(--font-size-sm);
        gap: 0.3rem;
    }
    
    .step-button {
        min-width: 24px;
        min-height: 24px;
        padding: 4px;
    }
    
    .step-button-icon {
        width: 12px !important;
        height: 12px !important;
    }
    
    .step-location {
        font-size: var(--font-size-xs);
        white-space: normal;
        text-align: center;
    }
    
    .terminal-empty-description {
        font-size: var(--font-size-sm);
    }
    
    /* instruction-arrow removed */
    
    .instruction-hint {
        font-size: var(--font-size-xs);
    }
    
    .hint-icon-svg {
        width: 14px !important;
        height: 14px !important;
    }
}

/* ===== LEGACY EMPTY STATE STYLES (for compatibility) ===== */
.empty-state {
    text-align: center;
    padding: 3rem 2rem;
    max-width: 500px;
    margin: 0 auto;
}

.empty-state-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    opacity: 0.6;
}

.empty-state-title {
    font-size: var(--font-size-xxl);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
    letter-spacing: 0.02em;
}

.empty-state-description {
    font-size: var(--font-size-md);
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 0;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .empty-state {
        padding: 2rem 1rem;
    }
    
    .empty-state-icon {
        font-size: 3rem;
        margin-bottom: 1rem;
    }
    
    .empty-state-title {
        font-size: var(--font-size-xl);
    }
    
    .empty-state-description {
        font-size: var(--font-size-sm);
    }
}

/* ===== MONACO EDITOR & FILE TREE STYLES ===== */

/* File Tree Container */
#file-tree-container {
    max-height: 100%;
    overflow-y: auto;
    padding: var(--spacing-sm);
    scrollbar-width: thin;
    scrollbar-color: var(--border-color) transparent;
}

/* File Tree Container Scrollbar Styling - Dark Theme */
#file-tree-container::-webkit-scrollbar {
    width: 8px;
}

#file-tree-container::-webkit-scrollbar-track {
    background: transparent;
    border-radius: 4px;
}

#file-tree-container::-webkit-scrollbar-thumb {
    background-color: var(--border-color);
    border-radius: 4px;
    transition: background-color var(--transition-fast);
}

#file-tree-container::-webkit-scrollbar-thumb:hover {
    background-color: var(--border-hover);
}

/* Light Theme Scrollbar Override */
.theme-light #file-tree-container {
    scrollbar-color: rgba(0, 0, 0, 0.2) transparent;
}

.theme-light #file-tree-container::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.2);
}

.theme-light #file-tree-container::-webkit-scrollbar-thumb:hover {
    background-color: rgba(0, 0, 0, 0.3);
}

.file-tree-root {
    width: 100%;
}

.file-tree-node {
    margin-bottom: 2px;
}

.tree-node-header {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: background-color var(--transition-fast);
    font-size: var(--font-size-sm);
}

.tree-node-header:hover {
    background-color: var(--bg-hover);
}

.tree-node-header.file-node:hover {
    background-color: var(--bg-active);
    color: var(--text-inverse);
}

.tree-node-icon {
    font-size: var(--font-size-md);
    flex-shrink: 0;
}

.tree-node-label {
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tree-node-children {
    margin-left: var(--spacing-md);
    border-left: 1px solid var(--border-color);
    padding-left: var(--spacing-sm);
}

.file-tree-empty {
    text-align: center;
    padding: var(--spacing-xl);
    color: var(--text-secondary);
}

.empty-icon {
    font-size: 2rem;
    margin-bottom: var(--spacing-md);
    opacity: 0.6;
}

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

/* Monaco Editor Modal */
#monaco-editor-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: var(--z-modal-backdrop);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
}

#monaco-editor-overlay.active {
    opacity: 1;
    visibility: visible;
}

#monaco-editor-modal {
    width: calc(100% - 4rem);
    height: calc(100% - 4rem);
    max-width: 1400px;
    max-height: 900px;
    background-color: var(--bg-primary);
    border-radius: var(--border-radius-lg);
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    transform: scale(0.9);
    transition: transform var(--transition-normal);
}

#monaco-editor-modal.active {
    transform: scale(1);
}

#monaco-editor-title {
    background-color: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    padding: var(--spacing-md);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.editor-header-left {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.file-icon {
    font-size: var(--font-size-lg);
}

.file-name {
    font-size: var(--font-size-md);
    font-weight: var(--font-weight-medium);
    color: var(--text-primary);
}

.file-status {
    font-size: var(--font-size-xs);
    color: var(--text-secondary);
    margin-left: var(--spacing-sm);
    font-weight: 500;
    letter-spacing: -0.01em;
    transition: all 200ms ease-out;
}

.file-status.status-edited {
    font-weight: 600;
}

.file-status.status-saved {
    font-weight: 600;
}

/* Subtle hover effect for better feedback */
.monaco-editor-title:hover .file-status {
    opacity: 0.9;
}

.editor-header-actions {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
}

#monaco-editor {
    flex: 1;
    width: 100%;
    overflow: hidden;
}

/* Git Diff Decorations for Monaco Editor */
.git-diff-added-line {
    background-color: rgba(40, 167, 69, 0.15) !important;
    border-left: 3px solid #28a745 !important;
}

.git-diff-modified-line {
    background-color: rgba(255, 193, 7, 0.15) !important;
    border-left: 3px solid #ffc107 !important;
}

.git-diff-deleted-line {
    background-color: rgba(220, 53, 69, 0.15) !important;
    border-left: 3px solid #dc3545 !important;
}

.git-diff-added-glyph {
    background-color: #28a745 !important;
    color: white !important;
    width: 16px !important;
    height: 16px !important;
    border-radius: 2px !important;
    text-align: center !important;
    line-height: 16px !important;
    font-size: 12px !important;
    font-weight: bold !important;
    font-family: monospace !important;
}

.git-diff-added-glyph::before {
    content: '+' !important;
}

.git-diff-modified-glyph {
    background-color: #ffc107 !important;
    color: #333 !important;
    width: 16px !important;
    height: 16px !important;
    border-radius: 2px !important;
    text-align: center !important;
    line-height: 16px !important;
    font-size: 12px !important;
    font-weight: bold !important;
    font-family: monospace !important;
}

.git-diff-modified-glyph::before {
    content: '~' !important;
}

.git-diff-deleted-glyph {
    background-color: #dc3545 !important;
    color: white !important;
    width: 16px !important;
    height: 16px !important;
    border-radius: 2px !important;
    text-align: center !important;
    line-height: 16px !important;
    font-size: 12px !important;
    font-weight: bold !important;
    font-family: monospace !important;
}

.git-diff-deleted-glyph::before {
    content: '-' !important;
}

.git-diff-added-margin {
    background-color: rgba(40, 167, 69, 0.1) !important;
}

.git-diff-modified-margin {
    background-color: rgba(255, 193, 7, 0.1) !important;
}

.git-diff-deleted-margin {
    background-color: rgba(220, 53, 69, 0.1) !important;
}

/* Monaco Editor Dark Theme Overrides */
.monaco-editor .margin {
    background-color: var(--bg-secondary) !important;
}

.monaco-editor .current-line {
    border: 1px solid var(--border-color) !important;
}

/* Panel controls */
.panel-controls {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
}

.panel-controls .btn-icon {
    min-width: 24px;
    min-height: 24px;
    padding: var(--spacing-xs);
}

/* Mobile responsive for Monaco Editor */
@media (max-width: 768px) {
    #monaco-editor-modal {
        width: 100%;
        height: 100%;
        border-radius: 0;
        margin: 0;
    }
    
    #monaco-editor-overlay {
        padding: 0;
    }
    
    .editor-header-left {
        gap: var(--spacing-xs);
    }
    
    .file-name {
        font-size: var(--font-size-sm);
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ===== SIDEBAR COLLAPSE BUTTON ===== */
.sidebar-collapse-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 24px;
    height: 24px;
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    z-index: 100;
    transition: all var(--transition-normal);
}

.sidebar-collapse-btn:hover {
    background-color: var(--bg-hover);
    border-color: var(--accent-primary);
}

.sidebar-collapse-btn:active {
    transform: scale(0.95);
}

.sidebar-collapse-btn .collapse-icon {
    transition: transform var(--transition-normal);
    color: var(--text-secondary);
    width: 12px;
    height: 12px;
}

.sidebar-collapse-btn.collapsed .collapse-icon {
    transform: rotate(-90deg);
}

/* Sidebar collapsed state */
.sidebar.collapsed {
    width: 0 !important;
    overflow: hidden;
}

.sidebar.collapsed .sidebar-panel,
.sidebar.collapsed .sidebar-divider {
    opacity: 0;
    pointer-events: none;
}

/* When sidebar is collapsed, move the button */
.sidebar.collapsed .sidebar-collapse-btn {
    position: fixed;
    left: 5px;
    top: 65px;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    pointer-events: auto;
    opacity: 1;
}

/* Adjust tab padding when sidebar is collapsed */
.sidebar-collapsed .terminal-tabs {
    padding-left: 35px; /* Space for collapse button */
}

/* Mobile adjustments for collapse button */
@media (max-width: 768px) {
    .sidebar-collapse-btn {
        display: none;
    }
}