* { margin: 0; padding: 0; box-sizing: border-box; } body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; background-color: #f5f5f5; height: 100dvh; overflow: hidden; } .container { display: flex; height: 100dvh; overflow: hidden; } /* Sidebar */ .sidebar { width: 300px; background-color: #2d3748; color: white; display: flex; flex-direction: column; min-height: 0; } .sidebar-header { padding: 1rem; border-bottom: 1px solid #4a5568; display: flex; justify-content: space-between; align-items: center; } .sidebar-header h3 { font-size: 1.1rem; font-weight: 600; } .sidebar-actions { display: flex; gap: 0.5rem; } .sidebar-actions button { background: none; border: none; color: white; cursor: pointer; padding: 0.25rem; border-radius: 4px; font-size: 1rem; transition: background-color 0.2s; } .sidebar-actions button:hover { background-color: #4a5568; } .file-tree { flex: 1; overflow-y: auto; padding: 0.5rem; } .file-item { padding: 0.5rem; cursor: pointer; border-radius: 4px; margin-bottom: 2px; display: flex; align-items: center; gap: 0.5rem; transition: background-color 0.2s; } .file-item:hover { background-color: #4a5568; } .file-item.selected { background-color: #3182ce; } .file-item.drag-target { background-color: #2b6cb0; outline: 1px dashed #90cdf4; } .file-item.dragging-file { opacity: 0.55; } .file-item.directory { font-weight: 600; } .file-item.root-drop { border: 1px dashed #4a5568; margin-bottom: 0.5rem; } .file-icon { font-size: 1rem; } .loading { padding: 1rem; text-align: center; color: #a0aec0; } /* Main Content */ .main-content { flex: 1; display: flex; flex-direction: column; background-color: white; min-width: 0; min-height: 0; overflow: hidden; } .editor-header { padding: 1rem; border-bottom: 1px solid #e2e8f0; display: flex; justify-content: space-between; align-items: center; background-color: #f7fafc; } .file-info { display: flex; align-items: center; gap: 1rem; } .runtime-hint { font-size: 0.75rem; color: #718096; border: 1px solid #e2e8f0; border-radius: 6px; padding: 0.2rem 0.45rem; white-space: nowrap; } #current-file { font-weight: 600; color: #2d3748; } .save-status { font-size: 0.875rem; color: #718096; } .save-status.saved { color: #38a169; } .save-status.unsaved { color: #e53e3e; } .mode-toggle { display: inline-flex; border: 1px solid #cbd5e0; border-radius: 8px; overflow: hidden; } .mode-btn { border: none; background: #edf2f7; color: #4a5568; padding: 0.45rem 0.8rem; font-size: 0.85rem; cursor: pointer; } .mode-btn + .mode-btn { border-left: 1px solid #cbd5e0; } .mode-btn.active { background: #3182ce; color: white; } .editor-actions { display: flex; gap: 0.5rem; } .editor-actions button { padding: 0.5rem 1rem; border: 1px solid #e2e8f0; background-color: white; color: #4a5568; border-radius: 6px; cursor: pointer; font-size: 0.875rem; transition: all 0.2s; } .editor-actions button:hover:not(:disabled) { background-color: #f7fafc; border-color: #cbd5e0; } .editor-actions button:disabled { opacity: 0.5; cursor: not-allowed; } .editor-actions button:not(:disabled):active { background-color: #edf2f7; } .run-main-toggle { display: inline-flex; align-items: center; gap: 0.45rem; border: 1px solid #e2e8f0; border-radius: 6px; padding: 0.4rem 0.6rem; font-size: 0.85rem; color: #374151; background: white; white-space: nowrap; } .run-main-toggle input[type="checkbox"] { margin: 0; } .editor-container { flex: 1; position: relative; min-height: 0; overflow: hidden; } .hidden { display: none !important; } .completion-dropdown { position: absolute; z-index: 30; display: none; min-width: 220px; max-width: 420px; max-height: 220px; overflow-y: auto; background: #ffffff; border: 1px solid #cbd5e0; border-radius: 6px; box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18); } .completion-item { display: flex; justify-content: space-between; gap: 1rem; padding: 0.4rem 0.6rem; cursor: pointer; font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace; font-size: 13px; } .completion-item:hover, .completion-item.active { background: #ebf8ff; } .completion-name { color: #1a202c; } .completion-type { color: #718096; font-size: 12px; } .tabs { display: flex; gap: 4px; padding: 0.4rem 0.5rem; border-bottom: 1px solid #e2e8f0; background: #f8fafc; overflow-x: auto; } .tab { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.35rem 0.6rem; border: 1px solid #cbd5e0; border-radius: 6px; background: white; color: #2d3748; cursor: pointer; white-space: nowrap; } .tab.active { border-color: #3182ce; background: #ebf8ff; } .tab-title { max-width: 260px; overflow: hidden; text-overflow: ellipsis; } .tab-close { border: none; background: transparent; color: #718096; cursor: pointer; font-size: 14px; line-height: 1; } .tab-close:hover { color: #e53e3e; } #editor { width: 100%; height: 100%; border: none; outline: none; font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace; font-size: 14px; line-height: 1.5; padding: 1rem; resize: none; } /* CodeMirror 6 styling */ .cm-editor { height: 100%; font-size: 14px; line-height: 1.5; } .cm-focused { outline: none; } .console-container { height: 220px; border-top: 1px solid #e2e8f0; display: flex; flex-direction: column; background: #0f172a; } .led-sim-panel { border-top: 1px solid #e2e8f0; background: #111827; color: #e5e7eb; padding: 0.75rem; } .led-sim-header { display: flex; justify-content: space-between; align-items: center; gap: 0.75rem; } .led-sim-header h3 { margin: 0; font-size: 0.95rem; font-weight: 600; } .led-sim-actions { display: flex; align-items: center; gap: 0.4rem; } .led-sim-actions button { padding: 0.3rem 0.65rem; border: 1px solid #374151; background: #1f2937; color: #e5e7eb; border-radius: 6px; cursor: pointer; font-size: 0.8rem; } .led-sim-actions button:hover:not(:disabled) { background: #243244; } .led-sim-actions button:disabled { opacity: 0.5; cursor: not-allowed; } .led-meta { margin-top: 0.5rem; color: #9ca3af; font-size: 0.82rem; } .led-grid { margin-top: 0.6rem; display: flex; flex-wrap: wrap; overflow-x: hidden; overflow-y: auto; gap: 8px; width: 100%; max-height: 132px; padding: 0.1rem 0 0.2rem; } .led-grid.panel-mode { display: grid; grid-template-columns: repeat(16, minmax(0, 24px)); grid-auto-rows: 24px; justify-content: start; align-content: start; gap: 6px; max-height: 470px; overflow: auto; } .led { width: 24px; height: 24px; min-width: 24px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, 0.2); box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.45); } .console-header { padding: 0.5rem 0.75rem; font-size: 0.85rem; color: #cbd5e1; border-bottom: 1px solid #1e293b; } .console-output { flex: 1; margin: 0; padding: 0.75rem; overflow: auto; font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace; font-size: 13px; line-height: 1.45; color: #e2e8f0; white-space: pre-wrap; } /* Modal */ .modal { display: none; position: fixed; z-index: 1000; left: 0; top: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.5); } .modal-content { background-color: white; margin: 15% auto; padding: 2rem; border-radius: 8px; width: 400px; box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2); } .modal-content h3 { margin-bottom: 1rem; color: #2d3748; } .modal-content input { width: 100%; padding: 0.75rem; border: 1px solid #e2e8f0; border-radius: 6px; font-size: 1rem; margin-bottom: 1rem; } .modal-content input:focus { outline: none; border-color: #3182ce; box-shadow: 0 0 0 3px rgba(49, 130, 206, 0.1); } .modal-actions { display: flex; gap: 0.5rem; justify-content: flex-end; } .modal-actions button { padding: 0.5rem 1rem; border: 1px solid #e2e8f0; background-color: white; color: #4a5568; border-radius: 6px; cursor: pointer; font-size: 0.875rem; transition: all 0.2s; } .modal-actions button:hover { background-color: #f7fafc; border-color: #cbd5e0; } .modal-actions button:first-child { background-color: #3182ce; color: white; border-color: #3182ce; } .modal-actions button:first-child:hover { background-color: #2c5aa0; border-color: #2c5aa0; } /* Responsive design */ @media (max-width: 768px) { body { height: 100dvh; overflow: hidden; } .container { flex-direction: column; height: 100dvh; overflow: hidden; } .sidebar { width: 100%; max-height: 30vh; min-height: 170px; } .sidebar-header { padding: 0.7rem 0.8rem; } .file-tree { min-height: 100px; } .main-content { min-height: 0; } .editor-header { padding: 0.65rem; flex-wrap: wrap; gap: 0.55rem; align-items: stretch; } .file-info { width: 100%; justify-content: space-between; } .mode-toggle { order: 3; } .editor-actions { width: 100%; order: 4; flex-wrap: wrap; } .editor-actions button { flex: 1 1 100px; } .run-main-toggle { width: 100%; justify-content: flex-start; flex: 1 1 100%; } .tabs { padding: 0.3rem 0.35rem; } .tab-title { max-width: 150px; } .editor-container { min-height: 46vh; } .cm-editor { font-size: 13px; } .modal-content { width: 90%; margin: 20% auto; } .led-grid { max-height: 120px; } .led-sim-header { flex-wrap: wrap; align-items: center; } .led-sim-actions { width: 100%; justify-content: flex-start; flex-wrap: wrap; } .console-container { height: 180px; } } /* Scrollbar styling */ .file-tree::-webkit-scrollbar { width: 6px; } .file-tree::-webkit-scrollbar-track { background: #2d3748; } .file-tree::-webkit-scrollbar-thumb { background: #4a5568; border-radius: 3px; } .file-tree::-webkit-scrollbar-thumb:hover { background: #718096; }