:root { --bg: #0d1117; --panel: #161b22; --border: #30363d; --text: #c9d1d9; --text-dim: #8b949e; --accent: #2f81f7; --accent-hover: #58a6ff; --hover: #21262d; --danger: #f85149; --header-h: 50px; --tab-h: 40px; --sidebar-w: 260px; --glass-bg: rgba(22, 27, 34, 0.72); --glass-border: rgba(48, 54, 61, 0.8); --preview-bg: #ffffff; --preview-text: #000000; --mobile-nav-h: 52px; } * { box-sizing: border-box; outline: none; } ::-webkit-scrollbar { width: 8px; height: 8px; } ::-webkit-scrollbar-track { background: var(--bg); } ::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; } ::-webkit-scrollbar-thumb:hover { background: var(--text-dim); } body { background: var(--bg); color: var(--text); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; height: 100vh; margin: 0; display: flex; flex-direction: column; overflow: hidden; } header { height: var(--header-h); background: var(--panel); border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; padding: 0 20px; z-index: 100; box-shadow: 0 1px 4px rgba(0,0,0,0.2); flex-shrink: 0; } .logo-area { display: flex; align-items: center; gap: 12px; } .logo-icon { color: var(--accent); display: flex; align-items: center; } .mobile-menu-btn { display: none; background: none; border: none; color: var(--text); cursor: pointer; padding: 4px; align-items: center; justify-content: center; } #topLink { height: 32px; padding: 0 16px; font-size: 13px; font-weight: 600; color: var(--accent); background: var(--glass-bg); backdrop-filter: blur(26px); -webkit-backdrop-filter: blur(26px); border: 1px solid var(--glass-border); border-radius: 25px; cursor: pointer; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); display: flex; align-items: center; justify-content: center; } #topLink:hover { background: rgba(47,129,247,0.15); border-color: var(--accent); } #topLink.hidden { opacity: 0; transform: scale(0.8); pointer-events: none; } #iframePanel { position: fixed; top: 58px; left: 20px; width: 100px; height: 42px; border-radius: 25px; opacity: 0; pointer-events: none; z-index: 2000; overflow: hidden; background: transparent; border: none; box-shadow: 0 0 0 rgba(0,0,0,0); transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1); } #iframePanel.open { opacity: 1; width: 420px; height: 680px; border-radius: 32px; pointer-events: auto !important; box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.85); } #iframePanelContent { width: 100%; height: 100%; display: flex; opacity: 0; background: transparent; transition: opacity 0.35s ease 0.15s; pointer-events: auto !important; } #iframePanel.open #iframePanelContent { opacity: 1; pointer-events: auto !important; } #iframePanelContent iframe, #iframePanel iframe, .web-card iframe, .flyout-panel iframe { width: 100%; height: 100%; border: none; background: transparent; pointer-events: auto !important; } .actions { display: flex; gap: 10px; align-items: center; } main { flex: 1; display: flex; overflow: hidden; position: relative; } #sidebar { width: var(--sidebar-w); background: var(--panel); border-right: 1px solid var(--border); display: flex; flex-direction: column; transition: background 0.3s, backdrop-filter 0.3s; position: relative; flex-shrink: 0; } .glass-sidebar { backdrop-filter: blur(15px); background: rgba(22,27,34,0.6) !important; } .sidebar-header { padding: 15px; font-size: 11px; font-weight: 600; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.5px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid transparent; } #file-tree { flex: 1; overflow-y: auto; padding: 5px 0; transition: background 0.15s, outline 0.15s; } #file-tree.drag-over { background: rgba(47, 129, 247, 0.08); outline: 2px dashed var(--accent); outline-offset: -2px; } .tree-item { cursor: pointer; padding: 6px 15px; display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-dim); transition: all 0.2s ease; user-select: none; } .tree-item:hover { background: var(--hover); color: var(--text); } .tree-item.active { background: #1f6feb15; color: var(--accent); border-left: 3px solid var(--accent); padding-left: 12px; } .tree-item.selected { background: var(--hover); color: var(--text); border-left: 3px solid transparent; padding-left: 12px; } .tree-item.drag-over { background: rgba(47, 129, 247, 0.2); border-left: 3px solid var(--accent); } .folder-indent { margin-left: 19px; border-left: 1px solid var(--border); padding-left: 8px; } .folder-row { display: flex; align-items: center; gap: 8px; width: 100%; } .folder-toggle { width: 18px; height: 18px; display: inline-flex; align-items: center; justify-content: center; transition: transform 0.18s ease; color: var(--text-dim); } .folder-toggle.expanded { transform: rotate(90deg); color: var(--text-dim); } .tree-item .name { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } /* Spinner */ .spinner { border: 3px solid rgba(255,255,255,0.06); border-top: 3px solid var(--accent); border-radius: 50%; width: 22px; height: 22px; animation: spin 1s linear infinite; } .spinner.small { width: 16px; height: 16px; border-width: 2px; border-top-width: 2px; } @keyframes spin { to { transform: rotate(360deg); } } #sidebar-overlay { display: none; position: fixed; inset: var(--header-h) 0 0 0; background: rgba(0,0,0,0.5); z-index: 1400; } #sidebar-overlay.show { display: block; } #upload-zone { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.85); z-index: 3000; display: none; flex-direction: column; align-items: center; justify-content: center; padding: 20px; transition: opacity 0.3s ease; } #upload-zone.show { display: flex; } .upload-card { background: var(--panel); border: 2px dashed var(--border); border-radius: 12px; padding: 60px 40px; text-align: center; transition: all 0.3s ease; max-width: 480px; } .upload-card.drag-over { border-color: var(--accent); background: rgba(47, 129, 247, 0.1); box-shadow: 0 0 24px rgba(47, 129, 247, 0.3); transform: scale(1.02); } .upload-icon { width: 56px; height: 56px; margin: 0 auto 20px; opacity: 0.7; } .upload-title { font-size: 18px; font-weight: 600; color: var(--text); margin-bottom: 8px; } .upload-subtitle { font-size: 14px; color: var(--text-dim); margin-bottom: 20px; } .upload-browse { display: inline-block; background: var(--accent); color: white; padding: 8px 20px; border-radius: 6px; border: none; cursor: pointer; font-size: 13px; font-weight: 600; transition: background 0.2s; margin-bottom: 12px; } .upload-browse:hover { background: var(--accent-hover); } .upload-types { font-size: 12px; color: var(--text-dim); margin-top: 16px; } #file-input-upload { display: none; } :root { --vs-surface: #252526; --vs-border-cm: #454545; --vs-text-cm: #cccccc; --vs-text-disabled: #6c6c6c; --vs-hover-bg: #04395e; --vs-hover-text: #ffffff; --vs-danger-hover: #c42b1c; --vs-shadow: rgba(0,0,0,0.5); } .vs-context-menu { display: none; position: fixed; background-color: var(--vs-surface); border: 1px solid var(--vs-border-cm); border-radius: 5px; box-shadow: 0 6px 20px var(--vs-shadow); padding: 4px 0; min-width: 220px; max-width: 300px; z-index: 9999; user-select: none; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; } .menu-list { list-style: none; margin: 0; padding: 0; } .menu-item { display: flex; align-items: center; padding: 5px 10px; cursor: pointer; color: var(--vs-text-cm); font-size: 13px; line-height: 1.4; gap: 0; } .menu-item.disabled { opacity: 0.45; pointer-events: none; } .menu-icon { width: 16px; height: 16px; margin-right: 8px; flex-shrink: 0; opacity: 0.85; color: var(--vs-text-cm); } .menu-label { flex-grow: 1; white-space: nowrap; } .shortcut { font-size: 11px; color: var(--vs-text-disabled); margin-left: 24px; padding-right: 4px; white-space: nowrap; } .menu-item:hover { background-color: var(--vs-hover-bg); color: var(--vs-hover-text); } .menu-item:hover .menu-icon, .menu-item:hover .shortcut { color: var(--vs-hover-text); opacity: 1; } .menu-divider { height: 1px; background-color: var(--vs-border-cm); margin: 4px 0; } .menu-item.danger:hover { background-color: var(--vs-danger-hover); } #editor-container { flex: 1; display: flex; flex-direction: column; min-width: 0; background: var(--bg); } #editor-top-bar { display: flex; align-items: stretch; background: var(--panel); border-bottom: 1px solid var(--border); } #tab-bar { height: var(--tab-h); background: var(--panel); display: flex; flex: 1 1 auto; min-width: 0; overflow-x: auto; } #editor-actions { display: flex; align-items: center; flex: 0 0 auto; padding: 0 8px; border-left: 1px solid var(--border); } #btn-format-code { display: flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; background: transparent; border: 1px solid var(--border); border-radius: 6px; color: var(--text-dim); font-size: 12px; cursor: pointer; transition: background 0.2s, color 0.2s, border-color 0.2s; white-space: nowrap; } #btn-format-code:hover { background: var(--hover); color: var(--text); border-color: var(--accent); } #btn-format-code svg { flex-shrink: 0; } .tab { padding: 0 16px; height: 100%; display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--text-dim); border-right: 1px solid var(--border); cursor: pointer; background: var(--panel); transition: background 0.2s; user-select: none; white-space: nowrap; } .tab:hover { background: var(--hover); } .tab.active { background: var(--bg); color: var(--text); border-top: 2px solid var(--accent); } .tab-close { opacity: 0.6; transition: opacity 0.2s; } .tab-close:hover { opacity: 1; color: var(--danger); } #monaco-editor { flex: 1; padding-top: 5px; min-height: 0; } #resizer { width: 5px; cursor: col-resize; background: var(--border); transition: background 0.2s; z-index: 10; flex-shrink: 0; } #resizer:hover, #resizer.active { background: var(--accent); } #preview-section { width: 40%; display: flex; flex-direction: column; background: #ffffff; position: relative; flex-shrink: 0; } .preview-toolbar { background: var(--panel); padding: 8px 15px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--border); color: var(--text); flex-shrink: 0; } #preview-frame { flex: 1; border: none; width: 100%; height: 100%; transition: width 0.3s cubic-bezier(0.4,0,0.2,1); margin: 0 auto; background: #fff; min-height: 0; pointer-events: auto !important; } .preview-mobile { width: 375px !important; border: 12px solid #222 !important; border-bottom: 25px solid #222 !important; border-radius: 30px; height: calc(100% - 40px) !important; margin: 20px auto !important; box-shadow: 0 10px 30px rgba(0,0,0,0.5); } .preview-tablet { width: 768px !important; border: 12px solid #222 !important; border-radius: 20px; height: calc(100% - 40px) !important; margin: 20px auto !important; box-shadow: 0 10px 30px rgba(0,0,0,0.5); } #preview-section.theme-dark { background: #1e1e1e; } #preview-section.theme-hc { background: #000000; } /* Console panel */ #console-panel { display: none; flex-direction: column; background: #1e1e1e; border-top: 1px solid var(--border); color: #d4d4d4; overflow: hidden; flex-shrink: 0; } #console-panel.show { display: flex; flex: 0 0 45%; } .console-header { display: flex; justify-content: space-between; align-items: center; padding: 6px 12px; background: var(--panel); border-bottom: 1px solid var(--border); font-size: 12px; font-weight: 600; color: var(--text-dim); flex-shrink: 0; } .console-header-title { display: flex; align-items: center; gap: 6px; } .console-header-actions { display: flex; gap: 14px; align-items: center; } .console-close-btn { cursor: pointer; opacity: 0.7; transition: opacity 0.2s; font-size: 16px; line-height: 1; font-weight: 400; } .console-close-btn:hover { opacity: 1; color: var(--danger); } #console-body { flex: 1; overflow-y: auto; font-family: Consolas, "Courier New", monospace; font-size: 12px; } .console-empty { padding: 14px 12px; color: var(--text-dim); font-style: italic; } .console-line { padding: 5px 12px; border-bottom: 1px solid #232323; white-space: pre-wrap; word-break: break-word; display: flex; gap: 8px; align-items: flex-start; } .console-line .console-icon { opacity: 0.7; flex-shrink: 0; margin-top: 2px; } .console-line.log { color: #d4d4d4; } .console-line.warn { color: #e3b341; background: rgba(227,179,65,0.08); } .console-line.error { color: #f85149; background: rgba(248,81,73,0.08); } #settings-panel { position: absolute; right: 0; top: 0; bottom: 0; width: 320px; background: var(--panel); border-left: 1px solid var(--border); z-index: 200; display: none; flex-direction: column; box-shadow: -8px 0 24px rgba(0,0,0,0.5); transform: translateX(100%); transition: transform 0.3s ease; } #settings-panel.show { display: flex; transform: translateX(0); } .settings-header { padding: 20px; border-bottom: 1px solid var(--border); font-weight: 600; display: flex; justify-content: space-between; align-items: center; } .settings-content { padding: 20px; overflow-y: auto; flex: 1; } .setting-group { margin-bottom: 24px; } .setting-label { font-size: 13px; color: var(--text-dim); margin-bottom: 10px; display: block; font-weight: 500; } input[type="text"], select { width: 100%; background: var(--bg); color: var(--text); border: 1px solid var(--border); padding: 8px 12px; border-radius: 6px; font-size: 13px; transition: border-color 0.2s; } input[type="text"]:focus, select:focus { border-color: var(--accent); } input[type="range"] { width: 100%; cursor: pointer; accent-color: var(--accent); } .checkbox-label { display: flex; align-items: center; gap: 8px; font-size: 13px; margin-bottom: 8px; cursor: pointer; } .checkbox-label input { accent-color: var(--accent); width: 16px; height: 16px; cursor: pointer; } .btn { cursor: pointer; background: var(--hover); border: 1px solid var(--border); color: var(--text); padding: 6px 12px; border-radius: 6px; font-size: 13px; display: flex; align-items: center; gap: 6px; transition: all 0.2s ease; font-weight: 500; } .btn:hover { background: var(--border); } .btn-primary { background: var(--accent); border-color: var(--accent); color: white; } .btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); } .icon-btn { cursor: pointer; opacity: 0.7; transition: opacity 0.2s; display: flex; align-items: center; } .icon-btn:hover { opacity: 1; color: var(--accent); } .tree-rename-input { background: var(--bg); border: 1px solid var(--accent); color: var(--text); font-size: 13px; padding: 2px 6px; border-radius: 4px; outline: none; width: calc(100% - 30px); } [data-tooltip] { position: relative; } [data-tooltip]:hover::after { content: attr(data-tooltip); position: absolute; bottom: 125%; left: 50%; transform: translateX(-50%); background: #000; color: #fff; padding: 6px 10px; border-radius: 4px; font-size: 11px; white-space: nowrap; z-index: 10001; pointer-events: none; } #mobile-tabbar { display: none; position: fixed; left: 0; right: 0; bottom: 0; height: var(--mobile-nav-h); background: var(--panel); border-top: 1px solid var(--border); z-index: 1600; align-items: stretch; } #mobile-tabbar button { flex: 1; background: none; border: none; color: var(--text-dim); font-size: 11px; font-weight: 500; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; cursor: pointer; } #mobile-tabbar button.active { color: var(--accent); } @media (max-width: 767px) { .mobile-menu-btn { display: flex; } main { padding-bottom: var(--mobile-nav-h); } #sidebar { position: fixed; top: var(--header-h); left: 0; bottom: 0; width: 82%; max-width: 300px; z-index: 1500; transform: translateX(-100%); transition: transform 0.3s ease; box-shadow: 8px 0 24px rgba(0,0,0,0.5); } #sidebar.mobile-open { transform: translateX(0); } #resizer { display: none; } #editor-container, #preview-section { width: 100% !important; flex: 1 1 100% !important; } main.mobile-view-editor #preview-section, main.mobile-view-editor #console-panel { display: none !important; } main.mobile-view-preview #editor-container { display: none !important; } #settings-panel { width: 88%; max-width: 340px; } #mobile-tabbar { display: flex; } header { padding: 0 10px; gap: 8px; } .logo-area { gap: 8px; } .logo-area span { font-size: 14px; } #topLink { display: none; } #editor-top-bar { min-width: 0; } #tab-bar { -webkit-overflow-scrolling: touch; } #editor-actions { padding: 0 6px; } #btn-format-code span { display: none; } #btn-format-code { padding: 0 8px; } .preview-toolbar { flex-wrap: wrap; gap: 6px; } } @media (min-width: 768px) { #mobile-tabbar { display: none; } .mobile-menu-btn { display: none; } #sidebar-overlay { display: none !important; } }
