*,*:before,*:after{margin:0;padding:0;box-sizing:border-box}:root{--bg: #0a0a0a;--bg-elevated: #141414;--bg-surface: #1a1a1a;--bg-hover: #222222;--border: #2a2a2a;--border-subtle: #1e1e1e;--text: #fafafa;--text-secondary: #a0a0a0;--text-muted: #666666;--accent: #f97316;--accent-dim: rgba(249, 115, 22, .15);--radius: 10px;--radius-sm: 6px;--radius-lg: 14px}html,body{height:100%;overflow:hidden;background:var(--bg);color:var(--text);font-family:Inter,-apple-system,BlinkMacSystemFont,sans-serif;font-size:14px;line-height:1.5;-webkit-font-smoothing:antialiased}#topbar{height:52px;display:flex;align-items:center;justify-content:space-between;padding:0 16px;border-bottom:1px solid var(--border);background:var(--bg-elevated);flex-shrink:0}.topbar-left{display:flex;align-items:center;gap:10px}.logo{height:20px;width:auto}.logo-text{font-weight:700;font-size:16px;letter-spacing:-.02em}.divider{width:1px;height:20px;background:var(--border)}.project-name{color:var(--text-secondary);font-size:13px;font-weight:500}.topbar-right{display:flex;align-items:center;gap:8px}.topbar-btn{display:flex;align-items:center;gap:6px;padding:6px 14px;border:1px solid var(--border);border-radius:var(--radius-sm);background:transparent;color:var(--text-secondary);font-size:13px;font-weight:500;cursor:pointer;transition:all .15s}.topbar-btn:hover{background:var(--bg-hover);color:var(--text)}.topbar-btn.primary{background:var(--text);color:var(--bg);border-color:var(--text)}.topbar-btn.primary:hover{opacity:.9}#editor{display:flex;height:calc(100vh - 52px);overflow:hidden}#chat-panel{width:380px;min-width:300px;max-width:600px;display:flex;flex-direction:column;border-right:1px solid var(--border);background:var(--bg)}#chat-history{flex:1;overflow-y:auto;padding:20px;display:flex;flex-direction:column;gap:16px;min-height:0}#chat-history:has(.welcome-message){overflow-y:hidden}#chat-history::-webkit-scrollbar{width:4px}#chat-history::-webkit-scrollbar-track{background:transparent}#chat-history::-webkit-scrollbar-thumb{background:var(--border);border-radius:2px}.welcome-message{display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:20px;flex:1;min-height:0}.welcome-icon{margin-bottom:16px}.welcome-icon img{height:28px;width:auto}.welcome-message h2{font-size:18px;font-weight:600;margin-bottom:6px;letter-spacing:-.02em}.welcome-message p{color:var(--text-muted);font-size:13px;max-width:260px}.chat-msg{display:flex;flex-direction:column;gap:4px}.chat-msg.user{align-items:flex-end}.chat-msg.assistant{align-items:flex-start}.msg-bubble{max-width:90%;padding:10px 14px;border-radius:var(--radius);font-size:13px;line-height:1.6;white-space:pre-wrap;word-break:break-word}.chat-msg.user .msg-bubble{background:var(--bg-surface);border:1px solid var(--border);color:var(--text)}.chat-msg.assistant .msg-bubble{background:transparent;color:var(--text-secondary);padding-left:0}.thinking{display:flex;align-items:center;gap:6px;padding:8px 0;color:var(--text-muted);font-size:13px}.thinking-dots{display:flex;gap:3px}.thinking-dots span{width:5px;height:5px;border-radius:50%;background:var(--text-muted);animation:dot-pulse 1.4s ease-in-out infinite}.thinking-dots span:nth-child(2){animation-delay:.2s}.thinking-dots span:nth-child(3){animation-delay:.4s}@keyframes dot-pulse{0%,80%,to{opacity:.3;transform:scale(.8)}40%{opacity:1;transform:scale(1)}}.generating{display:flex;align-items:center;gap:8px;padding:8px 0;color:var(--accent);font-size:13px;font-weight:500}.generating-spinner{width:14px;height:14px;border:2px solid var(--accent-dim);border-top-color:var(--accent);border-radius:50%;animation:spin .8s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}#chat-input-area{padding:12px 16px 16px;border-top:1px solid var(--border-subtle)}#input-wrapper{display:flex;align-items:center;gap:8px;background:var(--bg-surface);border:1px solid var(--border);border-radius:var(--radius);padding:8px 10px 8px 14px;transition:border-color .15s}#input-wrapper:focus-within{border-color:#444}#prompt-input{flex:1;background:transparent;border:none;outline:none;color:var(--text);font-family:Inter,sans-serif;font-size:13px;line-height:1.5;resize:none;max-height:120px;overflow-y:auto}#prompt-input::placeholder{color:var(--text-muted)}#send-btn{width:32px;height:32px;border-radius:var(--radius-sm);border:none;background:var(--text);color:var(--bg);cursor:pointer;display:flex;align-items:center;justify-content:center;flex-shrink:0;transition:opacity .15s}#send-btn:hover{opacity:.85}#send-btn:disabled{opacity:.3;cursor:not-allowed}#resize-handle{width:4px;cursor:col-resize;background:transparent;transition:background .15s;flex-shrink:0}#resize-handle:hover,#resize-handle.dragging{background:var(--accent)}#preview-panel{flex:1;display:flex;flex-direction:column;background:var(--bg-elevated);min-width:300px}#preview-toolbar{height:40px;display:flex;align-items:center;justify-content:space-between;padding:0 12px;border-bottom:1px solid var(--border);flex-shrink:0}.preview-tabs{display:flex;gap:2px}.preview-tab{padding:6px 12px;border:none;background:transparent;color:var(--text-muted);font-size:12px;font-weight:500;cursor:pointer;border-radius:var(--radius-sm);transition:all .15s}.preview-tab:hover{color:var(--text-secondary)}.preview-tab.active{color:var(--text);background:var(--bg-hover)}.preview-actions{display:flex;gap:4px}.preview-action-btn{width:28px;height:28px;border:none;background:transparent;color:var(--text-muted);cursor:pointer;border-radius:var(--radius-sm);display:flex;align-items:center;justify-content:center;transition:all .15s}.preview-action-btn:hover{background:var(--bg-hover);color:var(--text-secondary)}#preview-content{flex:1;position:relative;overflow:hidden}#preview-empty{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;color:var(--text-muted)}.empty-icon{opacity:.3}#preview-empty p{font-size:13px}#preview-iframe{width:100%;height:100%;border:none;background:#1a1a1a}#preview-loading{position:absolute;inset:0;background:#0a0a0acc;display:none;flex-direction:column;align-items:center;justify-content:center;gap:16px;z-index:10}#preview-loading.visible{display:flex}#preview-loading .generating-spinner{width:24px;height:24px}#preview-loading p{color:var(--text-secondary);font-size:13px}#deploy-overlay{position:fixed;inset:0;background:#000000b3;backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px);display:none;align-items:center;justify-content:center;z-index:100;opacity:0;transition:opacity .25s ease}#deploy-overlay.visible{display:flex;opacity:1}#deploy-modal{background:var(--bg-surface);border:1px solid var(--border);border-radius:16px;padding:40px 44px;min-width:380px;max-width:420px;text-align:center;box-shadow:0 24px 80px #0009;transform:scale(.95);transition:transform .25s ease}#deploy-overlay.visible #deploy-modal{transform:scale(1)}.deploy-step{display:none;flex-direction:column;align-items:center;gap:8px}.deploy-step.visible{display:flex}.deploy-apple-logo{width:56px;height:56px;border-radius:14px;background:linear-gradient(135deg,#1a1a1a,#2a2a2a);border:1px solid var(--border);display:flex;align-items:center;justify-content:center;margin-bottom:8px}.deploy-title{font-size:18px;font-weight:700;letter-spacing:-.02em;color:var(--text)}.deploy-subtitle{font-size:13px;color:var(--text-muted);line-height:1.5;margin-bottom:12px}.deploy-subtitle strong{color:var(--text-secondary)}.deploy-btn{display:flex;align-items:center;justify-content:center;gap:8px;width:100%;padding:12px 20px;border:none;border-radius:var(--radius);font-size:14px;font-weight:600;cursor:pointer;transition:all .15s;background:#fff;color:#0a0a0a;margin-top:4px}.deploy-btn:hover{opacity:.9;transform:translateY(-1px)}.deploy-btn:active{transform:translateY(0)}.deploy-btn-success{background:#22c55e;color:#fff}.deploy-spinner-ring{margin-bottom:8px}.deploy-spinner-arc{animation:deploy-spin 1s linear infinite;transform-origin:center}@keyframes deploy-spin{to{transform:rotate(360deg)}}.deploy-progress-text{font-family:JetBrains Mono,monospace;font-size:12px}.deploy-success-check{margin-bottom:8px}.deploy-check-path{stroke-dasharray:40;stroke-dashoffset:40;animation:deploy-check-draw .5s ease .2s forwards}@keyframes deploy-check-draw{to{stroke-dashoffset:0}}.deploy-success-title{color:#22c55e}.deploy-app-card{display:flex;align-items:center;gap:12px;padding:12px 16px;background:var(--bg-elevated);border:1px solid var(--border);border-radius:var(--radius);width:100%;margin:8px 0 4px}.deploy-app-icon{width:40px;height:40px;border-radius:10px;overflow:hidden;flex-shrink:0}.deploy-app-info{display:flex;flex-direction:column;align-items:flex-start;gap:2px}.deploy-app-name{font-size:14px;font-weight:600;color:var(--text)}.deploy-app-status{font-size:12px;color:#22c55e;font-weight:500}.file-line{opacity:0;animation:file-appear .3s ease forwards;font-family:JetBrains Mono,monospace;font-size:12px;line-height:1.8;color:var(--text-secondary)}@keyframes file-appear{0%{opacity:0;transform:translateY(4px)}to{opacity:1;transform:translateY(0)}}.file-line .file-icon{color:var(--accent);margin-right:6px}
