/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    height: 100vh;
    overflow: hidden;
}

/* Screen Management */
.screen {
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

/* IDE Workspace */
#ide-workspace {
    background-color: #2d3748;
    display: flex;
    flex-direction: column;
    height: 100vh;
    min-height: 400px; /* Ensure minimum height to keep status bar visible */
    overflow: hidden; /* Prevent scrolling of the entire workspace */
}

/* Title Bar */
.title-bar {
    background-color: #1a202c;
    border-bottom: 1px solid #2d3748;
    padding: 0.25rem 1rem 0.5rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 48px;
    height: 48px; /* Fixed height to prevent shrinking */
    position: relative;
    z-index: 100;
    flex-shrink: 0; /* Prevent title bar from shrinking */
}

.title-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.menu-btn {
    background: none;
    border: none;
    color: #e2e8f0;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.125rem 0.5rem; /* Match title button height with appropriate horizontal padding */
    border-radius: 4px;
    transition: background-color 0.2s ease;
    outline: none; /* Remove focus outline */
}

.menu-btn:hover {
    background-color: #4a5568;
}

.menu-btn:focus {
    outline: none; /* Remove focus outline */
    background-color: #4a5568; /* Use same as hover instead of green */
}

.menu-btn:active {
    outline: none; /* Remove active outline */
    background-color: #2d3748; /* Darker background when pressed */
}

.ide-title {
    color: #e2e8f0;
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0;
}

.title-center {
    flex: 1;
    text-align: center;
}



.title-right {
    display: flex;
    gap: 0.5rem;
}

.title-btn {
    padding: 0.5rem 1rem; /* Increased from 0.125rem to 0.5rem for taller buttons */
    border: none;
    border-radius: 4px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
}

.title-btn.run-btn {
    background-color: #4CAF50;
    color: white;
    outline: none;
}

.title-btn.run-btn:hover {
    background-color: #45a049;
}

.title-btn.run-btn:focus {
    outline: none;
    background-color: #45a049; /* Same as hover instead of green highlight */
}

.title-btn.run-btn:active {
    outline: none;
    background-color: #3d8b40; /* Darker green when pressed */
}

.title-btn.run-btn.disabled {
    background-color: #6b7280 !important;
    color: #9ca3af !important;
    cursor: not-allowed !important;
    opacity: 0.6;
}

.title-btn.run-btn.disabled:hover {
    background-color: #6b7280 !important;
    color: #9ca3af !important;
}

.title-btn.clear-btn {
    background-color: #6c757d;
    color: white;
    outline: none;
}

.title-btn.clear-btn:hover {
    background-color: #5a6268;
}

.title-btn.clear-btn:focus {
    outline: none;
    background-color: #5a6268; /* Same as hover instead of green highlight */
}

.title-btn.clear-btn:active {
    outline: none;
    background-color: #495057; /* Darker gray when pressed */
}

/* Dropdown Menu */
.dropdown-menu {
    position: fixed;
    top: 48px;
    left: 1rem;
    background-color: #1a202c !important;
    border: 1px solid #2d3748;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    min-width: 200px;
    z-index: 9999;
    max-height: 400px;
    overflow: visible;
}

.dropdown-menu.hidden {
    display: none;
}

.menu-item {
    padding: 0.75rem 1rem;
    color: #e2e8f0 !important;
    cursor: pointer;
    transition: background-color 0.2s ease;
    font-size: 0.9rem;
    display: flex !important;
    align-items: center;
    gap: 0.5rem;
}

.menu-item:hover {
    background-color: #4a5568;
}

.menu-item:first-child {
    border-radius: 6px 6px 0 0;
}

.menu-item:last-child {
    border-radius: 0 0 6px 6px;
}

.menu-separator {
    height: 1px;
    background-color: #2d3748;
    margin: 0.25rem 0;
}

.ide-container {
    display: grid;
    grid-template-columns: 12% 4px 46% 4px 41%; /* Files 12%, Editor 46%, Console increased to 41% */
    grid-template-rows: 1fr;
    width: 100%;
    flex: 1;
    min-height: 300px; /* Ensure container has minimum height */
    overflow: hidden; /* Prevent container from expanding beyond viewport */
}

/* Status Bar */
.status-bar {
    background-color: #2d3748;
    border-top: 1px solid #2d3748;
    padding: 0.25rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 24px;
    height: 24px; /* Fixed height to prevent shrinking */
    font-size: 0.8rem;
    color: #718096;
    flex-shrink: 0; /* Prevent status bar from shrinking */
}

.status-left {
    display: flex;
    gap: 1rem;
}

.status-center {
    flex: 1;
    text-align: center;
}

.status-right {
    display: flex;
    gap: 0.5rem;
}

.status-item {
    color: #a0aec0;
    font-weight: 400;
}

.status-message {
    color: #4CAF50;
    font-style: italic;
}

.status-warnings {
    color: #ffd93d;
    font-weight: 500;
}

/* Panel Styles */
.panel {
    background-color: #1a202c;
    border: 1px solid #2d3748;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.panel-header {
    background-color: #2d3748;
    padding: 0.25rem 1rem;
    border-bottom: 1px solid #2d3748;
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 36px;
    height: 36px;
}

.panel-header h3 {
    color: #e2e8f0;
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Ensure console header matches files header exactly */
#console-panel .panel-header {
    height: 36px !important;
    min-height: 36px !important;
    max-height: 36px !important;
    padding: 0.25rem 1rem !important;
    box-sizing: border-box !important;
}

.panel-content {
    flex: 1;
    overflow: hidden;
    position: relative;
}

/* Files Panel */
#files-panel {
    grid-column: 1;
}

/* Files panel content should use flexbox for search results */
#files-panel .panel-content {
    display: flex;
    flex-direction: column;
}

/* Search Interface */
.search-container {
    padding: 0.5rem;
    border-bottom: 1px solid #2d3748;
    background-color: #1a202c;
}

.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.search-input {
    width: 100%;
    padding: 0.5rem 2rem 0.5rem 0.75rem;
    background-color: #2d3748;
    border: 1px solid #4a5568;
    border-radius: 4px;
    color: #e2e8f0;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.2s ease;
}

.search-input:focus {
    border-color: #4CAF50;
}

.search-input::placeholder {
    color: #718096;
}

.search-clear-btn {
    position: absolute;
    right: 0.5rem;
    background: none;
    border: none;
    color: #718096;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 2px;
    transition: all 0.2s ease;
    opacity: 0;
}

.search-input:not(:placeholder-shown) + .search-clear-btn {
    opacity: 1;
}

.search-clear-btn:hover {
    background-color: #4a5568;
    color: #e2e8f0;
}



/* Search Results */
.search-results {
    background-color: #1a202c;
    border-bottom: 1px solid #2d3748;
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.search-results.hidden {
    display: none;
}

.search-results-header {
    padding: 0.5rem;
    background-color: #2d3748;
    color: #a0aec0;
    font-size: 0.8rem;
    font-weight: 500;
    border-bottom: 1px solid #4a5568;
    flex-shrink: 0;
}

.search-results-list {
    padding: 0.25rem 0;
    flex: 1;
    overflow-y: auto;
}

.search-result-item {
    padding: 0.5rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
    border-left: 3px solid transparent;
}

.search-result-item:hover {
    background-color: #2d3748;
    border-left-color: #4CAF50;
}



.search-result-content {
    color: #a0aec0;
    font-size: 0.8rem;
    font-family: 'Courier New', monospace;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-result-line {
    color: #718096;
    font-size: 0.7rem;
    margin-right: 0.5rem;
}

.search-highlight {
    background-color: #ffd93d;
    color: #1a202c;
    padding: 0.1rem 0.2rem;
    border-radius: 2px;
}

.search-no-results {
    padding: 1rem;
    text-align: center;
    color: #718096;
    font-size: 0.9rem;
    font-style: italic;
}

/* Search line highlighting in CodeMirror */
.search-highlight-line {
    background-color: rgba(255, 217, 61, 0.2) !important;
    animation: searchHighlightFade 2s ease-out;
}

@keyframes searchHighlightFade {
    0% { background-color: rgba(255, 217, 61, 0.4) !important; }
    100% { background-color: rgba(255, 217, 61, 0.1) !important; }
}

.file-controls {
    display: flex;
    gap: 0.5rem;
}

.control-btn {
    background: none;
    border: none;
    color: #a0aec0;
    font-size: 1rem;
    cursor: pointer;
    padding: 0.125rem 0.5rem;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.control-btn:hover {
    background-color: #4a5568;
    color: #e2e8f0;
}

.control-btn:focus {
    outline: none;
    background-color: #4a5568;
    color: #e2e8f0;
}

.control-btn:active {
    outline: none;
    background-color: #2d3748;
}



.file-tree {
    padding: 0.5rem;
    color: #e2e8f0;
    flex: 1;
    overflow-y: auto;
}

.file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem;
    margin: 0.25rem 0;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.file-item:hover {
    background-color: #4a5568;
}

.file-item.active {
    background-color: #4CAF50;
    color: white;
}

.file-name {
    flex: 1;
    font-size: 0.9rem;
}

.delete-file-btn {
    background: none;
    border: none;
    color: #ff6b6b;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 2px;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.delete-file-btn:hover {
    opacity: 1;
    background-color: rgba(255, 107, 107, 0.2);
}

.delete-file-btn:focus {
    outline: none;
    opacity: 1;
    background-color: rgba(255, 107, 107, 0.2);
}

.file-actions {
    display: flex;
    gap: 0.25rem;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.file-item:hover .file-actions {
    opacity: 1;
}

.rename-file-btn {
    background: none;
    border: none;
    color: #4CAF50;
    font-size: 0.9rem;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 2px;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.rename-file-btn:hover {
    opacity: 1;
    background-color: rgba(76, 175, 80, 0.2);
}

.rename-file-btn:focus {
    outline: none;
    opacity: 1;
    background-color: rgba(76, 175, 80, 0.2);
}



/* Editor Panel */
#editor-panel {
    grid-column: 3;
}

/* Editor panel header with title and filename on same line */
#editor-panel .panel-header {
    flex-direction: row;
    height: 36px;
    min-height: 36px;
    padding: 0.25rem 1rem;
    justify-content: space-between;
}

#editor-panel .panel-header h3 {
    margin: 0;
    flex-shrink: 0;
}

.editor-tabs {
    display: flex;
    background-color: transparent;
    border: none;
    overflow-x: auto;
    min-height: auto;
    height: auto;
    align-items: center;
    padding: 0;
    box-sizing: border-box;
    flex: 1;
    justify-content: flex-end;
}

.current-filename {
    color: #a0aec0;
    font-size: 0.9rem;
    font-weight: 400;
    text-decoration: none;
    border: none;
    border-bottom: none;
    margin-left: 1rem;
    font-style: italic;
}

.code-editor {
    height: 100%;
    background-color: #1a202c;
    padding: 0;
    position: relative;
    overflow: hidden; /* Prevent expansion */
}

.editor-wrapper {
    position: relative;
    height: 100%;
    width: 100%;
    overflow: hidden; /* Prevent expansion */
}

.line-numbers {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 50px;
    background-color: #2d3748;
    color: #718096;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.4;
    padding: 1rem 0.5rem;
    text-align: right;
    user-select: none;
    border-right: 1px solid #4a5568;
    overflow-y: auto;
    overflow-x: hidden;
    box-sizing: border-box;
}

.line-number {
    height: 19.6px; /* Match line height */
}

.code-textarea {
    width: 100%;
    height: 100%;
    border: none;
    outline: none;
    resize: none;
    background-color: #1a202c;
    color: #e2e8f0;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.4;
    padding: 1rem;
    tab-size: 4;
    overflow-y: auto;
    overflow-x: auto;
    box-sizing: border-box;
}

.code-textarea::placeholder {
    color: #718096;
}

.syntax-overlay {
    position: absolute;
    top: 0;
    left: 50px; /* Account for line numbers */
    right: 0;
    bottom: 0;
    pointer-events: none;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.4;
    padding: 1rem;
    color: transparent; /* Make base text transparent */
    white-space: pre-wrap;
    overflow: hidden;
    z-index: 1;
    box-sizing: border-box;
}

/* Syntax highlighting colors */
.syntax-overlay .syntax-keyword {
    color: #9f7aea !important;
    font-weight: bold;
}

.syntax-overlay .syntax-string {
    color: #68d391 !important;
}

.syntax-overlay .syntax-comment {
    color: #718096 !important;
    font-style: italic;
}

.syntax-overlay .syntax-number {
    color: #fbb6ce !important;
}

.syntax-overlay .syntax-operator {
    color: #fbd38d !important;
}

.syntax-overlay .syntax-bracket {
    color: #63b3ed !important;
}

/* Editor tabs */
.editor-tab {
    display: flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    background-color: #2d3748;
    border: 1px solid #4a5568;
    border-bottom: none;
    cursor: pointer;
    color: #a0aec0;
    font-size: 0.9rem;
    margin-right: 2px;
    border-radius: 4px 4px 0 0;
    transition: all 0.2s ease;
}

.editor-tab:hover {
    background-color: #4a5568;
    color: #e2e8f0;
}

.editor-tab.active {
    background-color: #1a202c;
    color: #e2e8f0;
    border-color: #4a5568;
}

.tab-name {
    margin-right: 0.5rem;
}

.tab-close {
    background: none;
    border: none;
    color: #a0aec0;
    cursor: pointer;
    font-size: 1.2rem;
    padding: 0;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 2px;
    transition: all 0.2s ease;
}

.tab-close:hover {
    background-color: #e53e3e;
    color: white;
}

/* Console Panel */
#console-panel {
    grid-column: 5;
}



.console-output {
    height: 100%;
    padding: 0.75rem;
    background-color: #000;
    color: #00ff00;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    overflow-y: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* Resizers */
.resizer {
    background-color: #2d3748;
    cursor: col-resize;
    transition: background-color 0.2s ease;
}

.resizer:hover {
    background-color: #2d3748;
}

#files-editor-resizer {
    grid-column: 2;
}

#editor-console-resizer {
    grid-column: 4;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .ide-container {
        grid-template-columns: 20% 4px 40% 4px 38.5%; /* Files 20%, Editor 40%, Console 38.5% for tablet */
    }
}

@media (max-width: 768px) {
    .title-bar {
        padding: 0.5rem;
        flex-wrap: wrap;
        min-height: auto;
    }
    
    .title-left {
        gap: 0.5rem;
    }
    
    .ide-title {
        font-size: 1rem;
    }
    
    .title-right {
        gap: 0.25rem;
    }
    
    .title-btn {
        padding: 0.4rem 0.8rem; /* Increased from 0.1rem to 0.4rem for mobile */
        font-size: 0.8rem;
    }
    
    .ide-container {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto 1fr;
    }
    
    .resizer {
        display: none;
    }
    
    #files-panel {
        grid-column: 1;
        grid-row: 1;
        max-height: 200px;
    }
    
    #editor-panel {
        grid-column: 1;
        grid-row: 2;
        min-height: 300px;
    }
    
    #console-panel {
        grid-column: 1;
        grid-row: 3;
        min-height: 200px;
    }
}

@media (max-width: 480px) {
    .title-bar {
        flex-direction: column;
        gap: 0.5rem;
        align-items: stretch;
    }
    
    .title-left, .title-center, .title-right {
        justify-content: center;
    }
    
    .title-center {
        order: -1;
    }
    
    .panel-header {
        padding: 0.25rem 0.5rem;
        min-height: 32px;
        height: 32px;
    }
    
    .panel-header h3 {
        font-size: 0.9rem;
    }
    
    .console-output {
        font-size: 0.8rem;
        padding: 0.5rem;
    }
    
    .dropdown-menu {
        left: 0.5rem;
        right: 0.5rem;
        width: auto;
    }
    
    .status-bar {
        flex-direction: column;
        gap: 0.25rem;
        padding: 0.5rem;
        text-align: center;
        min-height: 40px; /* Ensure minimum height on mobile */
        height: auto; /* Allow height to adjust on mobile */
    }
    
    .status-left, .status-right {
        justify-content: center;
    }
}

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

@media (prefers-color-scheme: light) {
    /* Light theme support can be added here if needed */
}

/* Focus styles for keyboard navigation */
button:focus,
.editor-tab:focus {
    outline: 2px solid #4CAF50;
    outline-offset: 2px;
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #2d3748;
}

::-webkit-scrollbar-thumb {
    background: #4a5568;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #718096;
}
/* 
Basic Python syntax highlighting using CSS (limited but safe) */
/* Future: We could add more sophisticated highlighting here */
/* For now, prioritizing functionality over syntax coloring *//*
 Background highlighting div */
.highlight-background {
    position: absolute;
    top: 0;
    left: 50px; /* After line numbers */
    right: 0;
    bottom: 0;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.4;
    padding: 1rem;
    white-space: pre-wrap;
    overflow: hidden;
    pointer-events: none;
    z-index: 1;
    color: transparent; /* Base text invisible */
    box-sizing: border-box;
}

/* Syntax highlighting colors for background */
.highlight-background .syntax-keyword {
    color: #9f7aea !important;
    font-weight: bold;
}

.highlight-background .syntax-string {
    color: #68d391 !important;
}

.highlight-background .syntax-comment {
    color: #718096 !important;
    font-style: italic;
}

.highlight-background .syntax-number {
    color: #fbb6ce !important;
}

.highlight-background .syntax-operator {
    color: #fbd38d !important;
}

.highlight-background .syntax-bracket {
    color: #63b3ed !important;
}/*
 CodeMirror Integration */
.cm-editor {
    height: 100% !important;
    font-family: 'Courier New', monospace !important;
    font-size: 14px !important;
}

.cm-editor .cm-content {
    padding: 1rem !important;
    color: #e2e8f0 !important;
    background-color: transparent !important;
}

.cm-editor .cm-focused {
    outline: none !important;
}

.cm-editor .cm-gutters {
    background-color: #2d3748 !important;
    border-right: 1px solid #4a5568 !important;
    color: #718096 !important;
}

.cm-editor .cm-lineNumbers .cm-gutterElement {
    color: #718096 !important;
    text-align: right !important;
    padding-right: 0.5rem !important;
}

/* CodeMirror 5 Sizing */
.CodeMirror {
    width: 100% !important;
    font-family: 'Courier New', monospace !important;
    font-size: 14px !important;
    background-color: #1a202c !important; /* Match panel background color */
    overflow: hidden !important;
    box-sizing: border-box !important;
}

.CodeMirror-scroll {
    overflow-y: auto !important;
    overflow-x: auto !important;
    box-sizing: border-box !important;
}

.CodeMirror-sizer {
    min-height: auto !important;
}

.CodeMirror-lines {
    padding: 4px 0 !important;
}

.CodeMirror-gutters {
    background-color: #2d3748 !important;
    border-right: 1px solid #4a5568 !important;
}

.CodeMirror-linenumber {
    color: #718096 !important;
    text-align: right !important;
    padding-right: 0.5rem !important;
}

/* Ensure the code editor container is properly sized */
#code-editor {
    height: 100% !important;
    width: 100% !important;
    max-height: 100% !important;
    overflow: hidden !important;
    position: relative !important;
}

/* Ensure the editor panel content area constrains the editor */
#editor-panel .panel-content {
    height: 100% !important;
    max-height: 100% !important;
    overflow: hidden !important;
    position: relative !important;
}

.cm-editor {
    background-color: #1a202c !important;
    border: none !important;
    outline: none !important;
}

.cm-editor.cm-focused {
    outline: none !important;
}

.cm-gutters {
    background-color: #2d3748 !important;
    border-right: 1px solid #4a5568 !important;
}

.cm-gutterElement {
    color: #718096 !important;
    padding-right: 0.5rem !important;
    min-height: 19.6px !important;
}

.cm-content {
    color: #e2e8f0 !important;
    background-color: transparent !important;
    caret-color: #e2e8f0 !important;
}

.cm-scroller {
    background-color: #1a202c !important;
}

.cm-highlight-background {
    background-color: transparent !important;
}/* Python
 Runner Button States */
.run-btn {
    background-color: #10b981 !important;
    color: white !important;
}

.run-btn:hover {
    background-color: #059669 !important;
}

.run-btn.disabled {
    background-color: #6b7280 !important;
    color: #9ca3af !important;
    cursor: not-allowed !important;
    opacity: 0.6;
}

.run-btn.disabled:hover {
    background-color: #6b7280 !important;
    color: #9ca3af !important;
}

.stop-btn {
    background-color: #ef4444 !important;
    color: white !important;
}

.stop-btn:hover {
    background-color: #dc2626 !important;
}

/* Console output styling */
.console-output {
    font-family: 'Courier New', monospace;
    white-space: pre-wrap;
    word-wrap: break-word;
    line-height: 1.4;
}
/* Ic
on-based UI Enhancements */

/* File tree icons */
.file-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.file-icon {
    color: #4a90e2;
    flex-shrink: 0;
}

.file-icon i {
    width: 16px;
    height: 16px;
}

.file-name {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-actions {
    display: flex;
    gap: 0.25rem;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.file-item:hover .file-actions {
    opacity: 1;
}

.file-actions button {
    background: none;
    border: none;
    color: #718096;
    cursor: pointer;
    padding: 0.125rem;
    border-radius: 2px;
    transition: all 0.2s ease;
}

.file-actions button:hover {
    background-color: #4a5568;
    color: #e2e8f0;
}

.file-actions button:focus {
    outline: none;
    background-color: #4a5568;
    color: #e2e8f0;
}

.rename-file-btn i,
.delete-file-btn i {
    width: 12px;
    height: 12px;
}

/* Panel header icons */
.panel-header h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.panel-header h3 i {
    width: 18px;
    height: 18px;
    color: #4a90e2;
}

/* Button icons */
.title-btn i,
.control-btn i,
.menu-btn i {
    width: 16px;
    height: 16px;
}

.menu-item i {
    width: 16px;
    height: 16px;
    margin-right: 0.5rem;
    color: #4a90e2;
}

/* Submenu Styles */
.menu-parent {
    position: relative;
    justify-content: space-between;
    overflow: visible;
}

.submenu-arrow {
    margin-left: auto;
    margin-right: 0;
    transition: transform 0.2s ease;
}

.menu-parent:hover .submenu-arrow {
    transform: rotate(90deg);
}

.submenu {
    position: absolute;
    left: 100%;
    top: 0;
    min-width: 150px;
    background-color: #1a202c !important;
    border: 1px solid #4a5568;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    opacity: 0;
    visibility: hidden;
    transform: translateX(-10px);
    transition: all 0.2s ease;
    z-index: 10000;
}

.menu-parent:hover .submenu,
.submenu.show {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateX(0) !important;
    display: block !important;
}

.submenu .menu-item {
    border-radius: 0;
    border-bottom: 1px solid #4a5568;
}

.submenu .menu-item:first-child {
    border-radius: 6px 6px 0 0;
}

.submenu .menu-item:last-child {
    border-radius: 0 0 6px 6px;
    border-bottom: none;
}

.submenu .menu-item:only-child {
    border-radius: 6px;
    border-bottom: none;
}

/* Console line styling with icons */
.console-line {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
    line-height: 1.4;
}

.console-timestamp {
    color: #718096;
    font-size: 0.8rem;
    flex-shrink: 0;
    min-width: 70px;
}

.console-icon {
    flex-shrink: 0;
    margin-top: 0.1rem;
}

.console-text {
    flex: 1;
    word-wrap: break-word;
}

/* Console line type colors */
.console-error .console-icon {
    color: #f56565;
}

.console-warning .console-icon {
    color: #ed8936;
}

.console-success .console-icon {
    color: #48bb78;
}

.console-info .console-icon {
    color: #4299e1;
}

.console-output .console-icon {
    color: #a0aec0;
}

/* Status bar icons */
.status-warnings i {
    width: 16px;
    height: 16px;
    margin-right: 0.25rem;
}

/* Ensure icons are properly sized in all contexts */
i[data-lucide] {
    width: 16px;
    height: 16px;
    stroke-width: 2;
}

/* Smaller icons for inline use */
.console-icon,
.file-actions i {
    width: 14px;
    height: 14px;
}

/* Accessibility improvements for icons */
button i[data-lucide] {
    pointer-events: none;
}

/* Icon animations */
.control-btn:hover i,
.title-btn:hover i {
    transform: scale(1.1);
    transition: transform 0.2s ease;
}

/* Ensure proper spacing in buttons with icons and text */
.title-btn {
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.menu-item {
    display: flex;
    align-items: center;
}/* S
plit.js Layout Styles */

/* Update IDE container for Split.js */
.ide-container {
    display: flex;
    flex-direction: row;
    flex: 1;
    min-height: 300px;
    overflow: hidden;
}

/* Split.js gutter styles */
.gutter {
    background-color: #2d3748;
    background-repeat: no-repeat;
    background-position: 50%;
    border-left: 1px solid #4a5568;
    border-right: 1px solid #4a5568;
    transition: background-color 0.2s ease;
}

.gutter:hover {
    background-color: #4a5568;
}

.gutter.gutter-horizontal {
    cursor: col-resize;
    background: linear-gradient(90deg, transparent 40%, #4a5568 45%, #4a5568 55%, transparent 60%);
}

/* Panel adjustments for Split.js */
.panel {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-width: 150px;
}

/* Resizing visual feedback */
body.resizing {
    cursor: col-resize !important;
}

body.resizing * {
    cursor: col-resize !important;
    user-select: none !important;
}

/* Ensure panels maintain their structure during resize */
.panel-header {
    flex-shrink: 0;
}

.panel-content {
    flex: 1;
    overflow: hidden;
    position: relative;
}

/* Remove old resizer styles since we're using Split.js */
.resizer {
    display: none;
}

/* Ensure proper sizing for Split.js panels */
#files-panel,
#editor-panel,
#console-panel {
    height: 100%;
    overflow: hidden;
}

/* Split.js responsive behavior */
@media (max-width: 768px) {
    .gutter {
        background-size: 40%;
    }
    
    .panel {
        min-width: 120px;
    }
}

/* Animation for panel size changes */
.panel {
    transition: flex-basis 0.2s ease-out;
}

/* Gutter tooltip styling */
.gutter {
    position: relative;
}

.gutter:hover::after {
    content: attr(title);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #1a202c;
    color: #e2e8f0;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    white-space: nowrap;
    z-index: 1000;
    pointer-events: none;
}

/* Ensure Split.js works with our existing grid layout */
.ide-container {
    /* Remove grid properties and use flexbox for Split.js */
    display: flex !important;
    grid-template-columns: none !important;
    grid-template-rows: none !important;
    gap: 0 !important;
}

/* Panel content scrolling */
.file-tree,
.console-output {
    overflow-y: auto;
    height: 100%;
}

/* Ensure code editor fills its container */
#code-editor {
    height: 100%;
    width: 100%;
    overflow: hidden;
}

/* Interpreter Selection Styles */
.interpreter-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.interpreter-option:hover {
    background-color: #4a5568;
}

.interpreter-option.selected {
    background-color: #2d5a87;
    color: #e2e8f0;
}

.selection-icon {
    width: 14px !important;
    height: 14px !important;
    color: #4CAF50;
}

.selection-icon.hidden {
    visibility: hidden;
}