Spaces:
Running
Running
| /* ============================ | |
| Global & Base | |
| ============================ */ | |
| * { | |
| box-sizing: border-box; | |
| margin: 0; | |
| padding: 0; | |
| } | |
| /* Optional: CRA root */ | |
| .App { | |
| text-align: center; | |
| } | |
| /* Root layout */ | |
| .ide-root { | |
| height: 100vh; | |
| width: 100vw; | |
| display: flex; | |
| flex-direction: column; | |
| font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; | |
| overflow: hidden; | |
| } | |
| /* Themes */ | |
| .ide-dark { | |
| background: #1e1e1e; | |
| color: #ddd; | |
| } | |
| .ide-light { | |
| background: #f5f5f5; | |
| color: #222; | |
| } | |
| /* ============================ | |
| Menubar | |
| ============================ */ | |
| .ide-menubar { | |
| height: 32px; | |
| display: flex; | |
| align-items: center; | |
| justify-content: space-between; | |
| padding: 0 10px; | |
| background: #252526; | |
| color: #eee; | |
| font-size: 13px; | |
| border-bottom: 1px solid #444; | |
| } | |
| .ide-menubar-left, | |
| .ide-menubar-right { | |
| display: flex; | |
| align-items: center; | |
| gap: 8px; | |
| } | |
| .ide-logo { | |
| font-weight: 600; | |
| margin-right: 12px; | |
| } | |
| .ide-menubar button { | |
| margin-right: 4px; | |
| background: transparent; | |
| border: none; | |
| color: inherit; | |
| cursor: pointer; | |
| padding: 2px 6px; | |
| border-radius: 3px; | |
| font-size: 13px; | |
| } | |
| .ide-menubar button:hover { | |
| background: rgba(255, 255, 255, 0.08); | |
| } | |
| /* ============================ | |
| Body Layout | |
| ============================ */ | |
| .ide-body { | |
| flex: 1; | |
| display: flex; | |
| overflow: hidden; | |
| } | |
| /* ============================ | |
| Sidebar (Explorer) | |
| ============================ */ | |
| .ide-sidebar { | |
| width: 210px; | |
| background: #252526; | |
| color: #ccc; | |
| padding: 5px; | |
| border-right: 1px solid #444; | |
| overflow-y: auto; | |
| font-size: 14px; | |
| } | |
| .tree-item { | |
| padding: 4px 6px; | |
| cursor: pointer; | |
| user-select: none; | |
| border-radius: 3px; | |
| } | |
| .tree-item:hover { | |
| background: #3a3d41; | |
| } | |
| /* ============================ | |
| Main (Editor + Output) | |
| ============================ */ | |
| .ide-main { | |
| flex: 1; | |
| display: flex; | |
| flex-direction: column; | |
| position: relative; | |
| min-width: 0; | |
| } | |
| /* Monaco wrapper */ | |
| .ide-editor-wrapper { | |
| flex: 1; | |
| min-height: 0; | |
| } | |
| /* Bottom panels (output, stdin, problems) */ | |
| .ide-panels { | |
| background: #1e1e1e; | |
| border-top: 1px solid #444; | |
| padding: 6px; | |
| font-size: 13px; | |
| height: 28%; | |
| overflow-y: auto; | |
| } | |
| .ide-output { | |
| background: #000; | |
| color: #0f0; | |
| padding: 6px; | |
| min-height: 60px; | |
| max-height: 120px; | |
| overflow-y: auto; | |
| border-radius: 4px; | |
| font-family: "Consolas", monospace; | |
| font-size: 12px; | |
| } | |
| .ide-input-box { | |
| width: 100%; | |
| margin-top: 4px; | |
| padding: 4px; | |
| background: #111; | |
| border: 1px solid #444; | |
| color: #eee; | |
| border-radius: 3px; | |
| font-size: 12px; | |
| } | |
| /* Problems panel */ | |
| .ide-problems-panel { | |
| margin-top: 6px; | |
| padding: 4px; | |
| background: #3c0000; | |
| color: #fff; | |
| border-left: 3px solid red; | |
| font-size: 12px; | |
| border-radius: 3px; | |
| } | |
| /* ============================ | |
| Right AI Panel | |
| ============================ */ | |
| .ide-right-panel { | |
| width: 280px; | |
| border-left: 1px solid #444; | |
| background: #252526; | |
| padding: 8px; | |
| display: flex; | |
| flex-direction: column; | |
| gap: 8px; | |
| font-size: 13px; | |
| } | |
| .ide-ai-header { | |
| font-weight: 600; | |
| margin-bottom: 4px; | |
| } | |
| .ide-ai-section { | |
| display: flex; | |
| flex-direction: column; | |
| gap: 4px; | |
| } | |
| .ide-ai-label { | |
| font-size: 12px; | |
| text-transform: uppercase; | |
| letter-spacing: 0.06em; | |
| opacity: 0.8; | |
| } | |
| /* AI instruction textarea */ | |
| .ide-agent-textarea { | |
| width: 100%; | |
| min-height: 80px; | |
| max-height: 160px; | |
| resize: vertical; | |
| padding: 6px; | |
| border-radius: 4px; | |
| border: 1px solid #444; | |
| background: #1e1e1e; | |
| color: #eee; | |
| font-family: Consolas, monospace; | |
| font-size: 12px; | |
| } | |
| /* AI buttons */ | |
| .ide-ai-buttons { | |
| display: flex; | |
| gap: 6px; | |
| } | |
| .ide-ai-buttons button { | |
| flex: 1; | |
| padding: 4px 6px; | |
| font-size: 12px; | |
| border-radius: 4px; | |
| border: 1px solid #555; | |
| background: #0e639c; | |
| color: #fff; | |
| cursor: pointer; | |
| } | |
| .ide-ai-buttons button:hover { | |
| background: #1177bb; | |
| } | |
| /* AI explanation box */ | |
| .ide-explain { | |
| max-height: 180px; | |
| overflow-y: auto; | |
| padding: 6px; | |
| border-radius: 4px; | |
| background: #1e1e1e; | |
| border: 1px solid #444; | |
| font-size: 12px; | |
| color: #eee; | |
| font-family: Consolas, monospace; | |
| } | |
| /* ============================ | |
| AI Suggestions Popup | |
| ============================ */ | |
| .ai-popup { | |
| position: absolute; | |
| bottom: 35%; | |
| right: 5px; | |
| width: 230px; | |
| background: #333; | |
| border: 1px solid #444; | |
| border-radius: 6px; | |
| padding: 4px; | |
| animation: fadeIn 0.25s ease-in-out; | |
| font-size: 12px; | |
| z-index: 20; | |
| } | |
| .ai-suggest { | |
| padding: 4px; | |
| cursor: pointer; | |
| } | |
| .ai-suggest:hover { | |
| background: #444; | |
| } | |
| /* ============================ | |
| Search Dialog | |
| ============================ */ | |
| .search-dialog { | |
| position: absolute; | |
| right: 10px; | |
| top: 50px; | |
| background: #333; | |
| padding: 10px; | |
| border: 1px solid #444; | |
| border-radius: 5px; | |
| z-index: 30; | |
| } | |
| .search-dialog input { | |
| width: 200px; | |
| padding: 4px 6px; | |
| border-radius: 3px; | |
| border: 1px solid #555; | |
| background: #1e1e1e; | |
| color: #eee; | |
| } | |
| /* ============================ | |
| Context Menu | |
| ============================ */ | |
| .ide-context-menu { | |
| position: absolute; | |
| background: #333; | |
| color: #eee; | |
| border: 1px solid #555; | |
| border-radius: 5px; | |
| padding: 4px; | |
| z-index: 40; | |
| } | |
| .ide-context-menu div { | |
| padding: 4px 8px; | |
| cursor: pointer; | |
| font-size: 13px; | |
| } | |
| .ide-context-menu div:hover { | |
| background: #555; | |
| } | |
| /* ============================ | |
| Animations | |
| ============================ */ | |
| @keyframes fadeIn { | |
| from { | |
| opacity: 0; | |
| transform: translateY(5px); | |
| } | |
| to { | |
| opacity: 1; | |
| transform: translateY(0); | |
| } | |
| } | |
| /* ============================ | |
| 📱 Mobile / Tablet Responsive | |
| ============================ */ | |
| @media (max-width: 768px) { | |
| /* Stack everything vertically */ | |
| .ide-body { | |
| flex-direction: column; | |
| } | |
| /* Sidebar: full width at top */ | |
| .ide-sidebar { | |
| width: 100%; | |
| max-height: 24vh; | |
| border-right: none; | |
| border-bottom: 1px solid #444; | |
| } | |
| /* Main editor: comes after sidebar */ | |
| .ide-main { | |
| order: 2; | |
| } | |
| .ide-editor-wrapper { | |
| height: 40vh; | |
| } | |
| /* Output panel: keep compact */ | |
| .ide-panels { | |
| height: auto; | |
| max-height: 26vh; | |
| } | |
| /* Right AI panel: full width at bottom */ | |
| .ide-right-panel { | |
| width: 100%; | |
| order: 3; | |
| border-left: none; | |
| border-top: 1px solid #444; | |
| } | |
| /* Search dialog: more width */ | |
| .search-dialog { | |
| right: 8px; | |
| left: 8px; | |
| width: auto; | |
| } | |
| /* Context menu: keep inside viewport */ | |
| .ide-context-menu { | |
| max-width: 70vw; | |
| } | |
| /* AI popup: center-ish on mobile */ | |
| .ai-popup { | |
| right: 8px; | |
| left: 8px; | |
| width: auto; | |
| } | |
| } | |
| /* ---------- progress bar under menubar ---------- */ | |
| .ide-progress-wrap { | |
| height: 3px; | |
| background: transparent; | |
| width: 100%; | |
| position: relative; | |
| overflow: hidden; | |
| } | |
| .ide-progress { | |
| position: absolute; | |
| height: 3px; | |
| width: 30%; | |
| left: -30%; | |
| top: 0; | |
| background: linear-gradient(90deg, #0e9, #08f); | |
| animation: progress-slide 1.2s linear infinite; | |
| border-radius: 2px; | |
| } | |
| @keyframes progress-slide { | |
| 0% { left: -30%; width: 30%; } | |
| 50% { left: 35%; width: 40%; } | |
| 100% { left: 100%; width: 30%; } | |
| } | |
| /* ---------- small inline spinner (optional) ---------- */ | |
| .button-spinner { | |
| display: inline-block; | |
| width: 12px; | |
| height: 12px; | |
| border: 2px solid rgba(255,255,255,0.25); | |
| border-top-color: rgba(255,255,255,0.95); | |
| border-radius: 50%; | |
| animation: spin 0.8s linear infinite; | |
| margin-left: 6px; | |
| vertical-align: middle; | |
| } | |
| @keyframes spin { | |
| to { transform: rotate(360deg); } | |
| } | |