:root{--bg: #0b1220;--panel: rgba(8, 13, 26, .92);--panel-border: rgba(121, 141, 187, .35);--text: #edf2ff;--text-muted: #a9b6d1;--accent: #44d7b6;--danger: #ff6f6f;--shadow: 0 18px 40px rgba(1, 4, 12, .5)}*{box-sizing:border-box}html,body{margin:0;width:100%;height:100%;background:var(--bg);color:var(--text);font-family:IBM Plex Sans,Segoe UI,sans-serif}#app{position:relative;width:100%;height:100%;overflow:hidden}.home-view{position:absolute;top:0;right:0;bottom:0;left:0;display:flex;justify-content:center;align-items:flex-start;padding:28px 18px;background:radial-gradient(1200px 520px at 16% -8%,rgba(68,215,182,.16),transparent 62%),radial-gradient(900px 500px at 95% 6%,rgba(85,126,255,.16),transparent 58%),linear-gradient(180deg,#0b1220,#070c16 68%);overflow-y:auto}.home-shell{width:min(880px,100%);border-radius:14px;border:1px solid rgba(121,141,187,.3);background:#080d1aeb;box-shadow:var(--shadow);padding:18px 18px 14px}.home-header h1{margin:0;font-size:clamp(1.35rem,2.1vw,1.8rem)}.home-header p{margin:8px 0 0;color:var(--text-muted);font-size:.95rem}.project-create-form{margin-top:16px;display:grid;gap:8px}.project-create-form label{color:var(--text-muted);font-size:.86rem}.project-create-row{display:grid;grid-template-columns:1fr auto;gap:10px}.project-create-row input{border-radius:10px;border:1px solid var(--panel-border);background:#040810cc;color:var(--text);padding:.55rem .65rem;font-size:.92rem}.project-list{margin:12px 0 0;padding:0;list-style:none;border-top:1px solid rgba(121,141,187,.2)}.project-row,.project-list-empty{padding:12px 4px;border-bottom:1px solid rgba(121,141,187,.14)}.project-row{display:grid;gap:6px}.project-row-header{display:flex;align-items:flex-start;justify-content:space-between;gap:10px}.project-row-actions{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:6px}.project-action{min-width:2rem;padding:.26rem .45rem;display:inline-flex;align-items:center;justify-content:center;line-height:1;font-size:.95rem}.project-action-danger{color:#ffd0d0;border-color:#ff6f6f73}.project-action-danger:hover{border-color:var(--danger)}.project-list-empty{color:var(--text-muted)}.project-open-link{display:inline-block;color:#c7defc;text-decoration:none;font-size:1.03rem;font-weight:600}.project-open-link:hover{color:#eff7ff}.project-row-details{margin-top:4px;color:var(--text-muted);font-size:.8rem}.project-deploy-link{margin-top:6px;display:inline-block;color:var(--accent);text-decoration:none;font-size:.84rem}.project-deploy-link:hover{text-decoration:underline}#game-canvas{position:absolute;top:0;right:0;bottom:0;left:0;width:100%;height:100%;display:block}#studio-ui{position:absolute;top:0;right:0;bottom:0;left:0;pointer-events:none}.ui-button{pointer-events:auto;border:1px solid var(--panel-border);background:linear-gradient(180deg,#223557,#15263f);color:var(--text);border-radius:10px;padding:.45rem .8rem;font-size:.9rem;cursor:pointer}.ui-button:hover{border-color:var(--accent)}.ui-button:disabled{opacity:.6;cursor:not-allowed}.ui-button.small{font-size:.78rem;padding:.35rem .65rem}.ui-button.ghost{background:transparent}.hidden{display:none!important}#terminal-toggle{position:absolute;top:14px;right:14px}.status-text{font-size:.78rem;color:var(--text-muted)}.terminal{pointer-events:auto;position:absolute;left:8px;right:8px;top:8px;bottom:8px;max-height:none;background:#04070ff5;border:1px solid var(--panel-border);border-radius:14px;box-shadow:var(--shadow);display:flex;flex-direction:column;overflow:hidden}.terminal.hidden{display:none}.terminal-header{display:flex;justify-content:space-between;align-items:center;padding:10px 12px;background:#080d19f2}.terminal-header-main{display:flex;align-items:center;gap:10px;min-width:0}.subtext{color:var(--text-muted);font-size:.78rem}.terminal-tabs{display:flex;gap:6px;margin-left:4px}.terminal-tab{border:1px solid var(--panel-border);background:transparent;color:var(--text-muted);border-radius:8px;padding:.3rem .6rem;font-size:.78rem;cursor:pointer}.terminal-tab:hover{border-color:var(--accent);color:var(--text)}.terminal-tab.active{border-color:var(--accent);background:linear-gradient(180deg,#223557,#15263f);color:var(--text)}.terminal-view{flex:1;min-height:0;display:flex;flex-direction:column}.settings-view{flex:1;min-height:0;overflow-y:auto}.terminal-log{flex:1;padding:10px;overflow:auto;font-family:IBM Plex Mono,Consolas,monospace;font-size:.86rem;line-height:1.35}.log-line{margin-bottom:6px;white-space:pre-wrap;word-break:break-word}.log-system{color:var(--text-muted)}.log-user{color:#8af8e4}.log-assistant{color:#e7f5ff}.log-error{color:var(--danger)}.log-tool{color:#99c8ff}.log-thinking{margin-bottom:8px;border:1px solid rgba(121,141,187,.35);border-radius:10px;background:#0a1221bf;overflow:hidden}.log-thinking summary{cursor:pointer;padding:8px 10px;color:var(--text-muted);font-family:IBM Plex Mono,Consolas,monospace;font-size:.8rem}.log-thinking summary:hover{color:var(--text)}.log-thinking[open] summary{border-bottom:1px solid rgba(121,141,187,.22)}.thinking-body{max-height:260px;overflow:auto;padding:8px 10px}.thinking-line{margin-bottom:6px;white-space:pre-wrap;word-break:break-word;font-family:IBM Plex Mono,Consolas,monospace;font-size:.8rem;line-height:1.35}.thinking-line:last-child{margin-bottom:0}.thinking-line.tool{color:#99c8ff}.thinking-line.system{color:var(--text-muted)}.thinking-line.error{color:var(--danger)}.terminal-settings,.project-section{padding:8px 12px;border-top:1px solid rgba(121,141,187,.2);background:#0f1928e6}.settings-view>:first-child{border-top:none}.settings-header{margin-bottom:8px;color:var(--text-muted)}.terminal-settings label{display:flex;flex-direction:column;gap:6px;margin-bottom:10px;font-size:.82rem;color:var(--text-muted)}.terminal-settings select,.terminal-settings input{border-radius:8px;border:1px solid var(--panel-border);background:#040810cc;color:var(--text);padding:.45rem .55rem}.terminal-settings details{margin-bottom:10px}.terminal-settings details summary{cursor:pointer;color:var(--text-muted);font-size:.82rem;margin-bottom:8px}.settings-actions{display:flex;align-items:center;gap:8px}.project-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px}.project-header strong{font-size:.9rem;color:var(--text-muted)}.project-actions{display:flex;align-items:center;gap:8px}.file-input-label{cursor:pointer;display:inline-flex;align-items:center;justify-content:center}.file-input-label input[type=file]{display:none}.export-section{padding:8px 12px;border-top:1px solid rgba(121,141,187,.2);background:#0f1928e6}.export-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px}.export-header strong{font-size:.9rem;color:var(--accent)}.export-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.deploy-section{padding:8px 12px;border-top:1px solid rgba(121,141,187,.2);background:#0f1928e6}.deploy-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px}.deploy-header strong{font-size:.9rem;color:var(--accent)}.deploy-actions{display:grid;grid-template-columns:1fr 1fr auto;gap:10px;align-items:end}.deploy-label{display:flex;flex-direction:column;gap:6px;font-size:.82rem;color:var(--text-muted)}.deploy-label input{border-radius:8px;border:1px solid var(--panel-border);background:#040810cc;color:var(--text);padding:.45rem .55rem}.deploy-advanced{margin-top:8px}.deploy-advanced summary{cursor:pointer;color:var(--text-muted);font-size:.82rem;margin-bottom:8px}.checkbox-label{display:flex;align-items:center;gap:6px;font-size:.82rem;color:var(--text-muted);cursor:pointer}.checkbox-label input[type=checkbox]{width:16px;height:16px;cursor:pointer}.terminal-form{display:grid;grid-template-columns:1fr;gap:8px;padding:10px;border-top:1px solid rgba(121,141,187,.2);background:#080d19f2}.terminal-form textarea{border-radius:8px;border:1px solid var(--panel-border);background:#040810cc;color:var(--text);padding:.5rem .6rem;font-family:IBM Plex Mono,Consolas,monospace;min-height:2.2rem;max-height:220px;resize:vertical}@media (max-width: 900px){.home-view{padding:14px 10px}.home-shell{padding:14px 12px}.project-create-row{grid-template-columns:1fr}.terminal{left:6px;right:6px;top:6px;bottom:6px}.terminal-header{flex-wrap:wrap;gap:8px}.terminal-header-main{flex-wrap:wrap}.terminal-tabs{margin-left:0}.terminal-form,.deploy-actions{grid-template-columns:1fr}}
