:root{--primary-color:#3b82f6;--primary-hover:#2563eb;--secondary-color:#64748b;--success-color:#10b981;--error-color:#ef4444;--warning-color:#f59e0b;--bg-primary:#0f172a;--bg-secondary:#1e293b;--bg-tertiary:#334155;--bg-surface:#475569;--text-primary:#f8fafc;--text-secondary:#cbd5e1;--text-muted:#64748b;--border-color:#334155;--border-hover:#475569;--shadow-sm:0 1px 2px 0 rgba(0,0,0,.05);--shadow-md:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -2px rgba(0,0,0,.1);--shadow-lg:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1);--shadow-xl:0 20px 25px -5px rgba(0,0,0,.1),0 8px 10px -6px rgba(0,0,0,.1);--transition-fast:150ms ease;--transition-normal:250ms ease;--transition-slow:350ms ease;--border-radius:8px;--border-radius-lg:12px;--border-radius-xl:16px}*{box-sizing:border-box;margin:0;padding:0}html{font-size:16px;scroll-behavior:smooth}body{background:var(--bg-primary);color:var(--text-primary);display:flex;flex-direction:column;font-family:Inter,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif;line-height:1.5;min-height:100vh;overflow-x:hidden}.hidden{display:none!important}.sr-only{height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;clip:rect(0,0,0,0);border:0;white-space:nowrap}::-webkit-scrollbar{height:8px;width:8px}::-webkit-scrollbar-track{background:var(--bg-secondary)}::-webkit-scrollbar-thumb{background:var(--bg-surface);border-radius:4px}::-webkit-scrollbar-thumb:hover{background:var(--text-muted)}.toolbar{align-items:center;-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);background:var(--bg-secondary);border-bottom:1px solid var(--border-color);display:flex;padding:.75rem 1.5rem;position:sticky;top:0;z-index:100}.project-title{color:var(--text-primary);flex:1;font-size:1.125rem;font-weight:600;margin:0 1rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.error-btn,.toolbar-actions,.toolbar-btn{align-items:center;display:flex;gap:.5rem}.error-btn,.toolbar-btn{background:transparent;border:1px solid var(--border-color);border-radius:var(--border-radius);color:var(--text-secondary);cursor:pointer;font-size:.875rem;font-weight:500;padding:.5rem .75rem;transition:all var(--transition-fast);white-space:nowrap}.toolbar-btn:hover{background:var(--bg-tertiary);border-color:var(--border-hover);color:var(--text-primary)}.toolbar-btn.primary{background:var(--primary-color);border-color:var(--primary-color);color:#fff}.error-btn{background:var(--error-color);border-color:var(--error-color);color:#fff}.toolbar-btn.primary:hover{background:var(--primary-hover);border-color:var(--primary-hover)}.toolbar-btn svg{height:18px;width:18px;fill:currentColor}.hamburger{align-self:center;display:block!important;position:relative;width:20px}.hamburger,.hamburger:after,.hamburger:before{background:currentColor;height:2px;transition:all var(--transition-fast)}.hamburger:after,.hamburger:before{content:"";left:0;position:absolute;width:100%}.hamburger:before{top:-6px}.hamburger:after{top:6px}.toolbar-btn:has(.hamburger){height:32px}.toolbar-btn.active .hamburger{background:transparent}.toolbar-btn.active .hamburger:before{top:0;transform:rotate(45deg)}.toolbar-btn.active .hamburger:after{top:0;transform:rotate(-45deg)}.main-container{display:flex;flex:1;min-height:0;position:relative}.sidebar{background:var(--bg-secondary);border-right:1px solid var(--border-color);bottom:0;display:flex;flex-direction:column;left:0;padding-top:4rem;position:fixed;top:0;transform:translateX(-100%);transition:transform var(--transition-normal);width:400px;z-index:90}.sidebar.open{transform:translateX(0)}.sidebar-header{align-items:center;border-bottom:1px solid var(--border-color);display:flex;justify-content:space-between;padding:1.5rem}.sidebar-header h2{color:var(--text-primary);font-size:1.125rem;font-weight:600}.close-btn{align-items:center;background:var(--bg-tertiary);border:none;border-radius:var(--border-radius);color:var(--text-secondary);cursor:pointer;display:flex;font-size:1.5rem;height:32px;justify-content:center;transition:all var(--transition-fast);width:32px}.close-btn:hover{background:var(--bg-surface);color:var(--text-primary)}.chat-messages{flex:1;gap:1rem;overflow-y:auto;padding:1rem}.chat-messages,.message{display:flex;flex-direction:column}.message{gap:.5rem}.message.user{align-items:flex-end}.message.assistant{align-items:flex-start}.message-bubble{border-radius:var(--border-radius-lg);font-size:.875rem;line-height:1.4;max-width:80%;padding:.75rem 1rem;word-wrap:break-word}.message.user .message-bubble{background:var(--primary-color);border-bottom-right-radius:4px;color:#fff}.message.assistant .message-bubble{background:var(--bg-tertiary);border-bottom-left-radius:4px;color:var(--text-primary)}.message-attachments{display:flex;flex-wrap:wrap;gap:.5rem;margin-top:.5rem}.attachment{align-items:center;background:var(--bg-surface);border-radius:var(--border-radius);color:var(--text-secondary);display:flex;font-size:.75rem;gap:.5rem;padding:.5rem}.attachment img{border-radius:4px;height:24px;-o-object-fit:cover;object-fit:cover;width:24px}.sidebar-footer{border-top:1px solid var(--border-color);padding:1rem 1.5rem}.project-info{display:flex;flex-direction:column;gap:.5rem}.project-stats{color:var(--text-muted);display:flex;font-size:.75rem;justify-content:space-between}.workspace{display:flex;flex:1;flex-direction:column;min-height:0;position:relative;width:100%}.welcome-screen{align-items:center;display:flex;flex:1;justify-content:center;overflow-y:auto;padding:2rem}.welcome-content{max-width:800px;text-align:center;width:100%}.logo-container{margin-bottom:3rem}.logo{color:var(--primary-color);height:80px;margin:0 auto 1.5rem;width:80px}.logo svg{height:100%;width:100%}.welcome-content h1{color:var(--text-primary);font-size:2.5rem;font-weight:700;margin-bottom:.75rem}.welcome-content p{color:var(--text-secondary);font-size:1.125rem;margin-bottom:2rem}.quick-actions{margin-bottom:3rem}.quick-actions h3{color:var(--text-primary);font-size:1.25rem;font-weight:600;margin-bottom:1.5rem}.action-grid{display:grid;gap:1rem;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));margin-bottom:2rem}.action-card{align-items:center;background:var(--bg-secondary);border:1px solid var(--border-color);border-radius:var(--border-radius-lg);cursor:pointer;display:flex;flex-direction:column;gap:.75rem;padding:1.5rem;text-align:center;transition:all var(--transition-normal)}.action-card:hover{background:var(--bg-tertiary);border-color:var(--primary-color);box-shadow:var(--shadow-lg);transform:translateY(-2px)}.action-card svg{color:var(--primary-color);height:32px;width:32px}.action-card span{color:var(--text-primary);font-weight:500}.project-list h3{color:var(--text-primary);font-size:1.25rem;font-weight:600;margin-bottom:1.5rem}.project-cards{display:grid;gap:1rem;grid-template-columns:repeat(auto-fill,minmax(280px,1fr))}.project-card{background:var(--bg-secondary);border:1px solid var(--border-color);border-radius:var(--border-radius-lg);cursor:pointer;padding:1.5rem;transition:all var(--transition-normal)}.project-card:hover{background:var(--bg-tertiary);border-color:var(--border-hover);box-shadow:var(--shadow-md);transform:translateY(-2px)}.project-card-header{align-items:center;display:flex;justify-content:space-between;margin-bottom:.75rem}.project-card h4{color:var(--text-primary);font-size:1rem;font-weight:600;margin:0}.project-card-actions{display:flex;gap:.25rem}.project-card-btn{align-items:center;background:var(--bg-surface);border:none;border-radius:4px;color:var(--text-secondary);cursor:pointer;display:flex;height:28px;justify-content:center;opacity:0;transition:all var(--transition-fast);width:28px}.project-card:hover .project-card-btn{opacity:1}.project-card-btn:hover{background:var(--primary-color);color:#fff}.project-card-btn.danger:hover{background:var(--error-color)}.project-card-btn svg{height:16px;width:16px}.project-card p{color:var(--text-secondary);font-size:.875rem;line-height:1.4;margin-bottom:.75rem}.project-meta{color:var(--text-muted);display:flex;font-size:.75rem;justify-content:space-between}.code-editor{background:var(--bg-secondary);display:flex;flex:1;flex-direction:column;position:relative}.editor-header{align-items:center;background:var(--bg-tertiary);border-bottom:1px solid var(--border-color);display:flex;justify-content:space-between;padding:.75rem 1rem}.file-tabs{display:flex;flex:1;gap:.25rem;overflow-x:auto}.file-tab{align-items:center;background:var(--bg-secondary);border:1px solid var(--border-color);border-radius:var(--border-radius) var(--border-radius) 0 0;color:var(--text-secondary);cursor:pointer;display:flex;font-size:.875rem;gap:.5rem;padding:.5rem .75rem;transition:all var(--transition-fast);white-space:nowrap}.file-tab.active{background:var(--bg-primary);border-bottom-color:var(--bg-primary);color:var(--text-primary)}.file-tab:hover:not(.active){background:var(--bg-surface);color:var(--text-primary)}.file-tab-close{align-items:center;background:none;border:none;border-radius:2px;color:var(--text-muted);cursor:pointer;display:flex;font-size:12px;height:16px;justify-content:center;line-height:1;width:16px}.file-tab-close:hover{background:var(--bg-surface);color:var(--text-primary)}.editor-actions{display:flex;gap:.5rem}.editor-btn{align-items:center;background:var(--bg-secondary);border:1px solid var(--border-color);border-radius:var(--border-radius);color:var(--text-secondary);cursor:pointer;display:flex;height:32px;justify-content:center;transition:all var(--transition-fast);width:32px}.editor-btn:hover{background:var(--bg-surface);border-color:var(--border-hover);color:var(--text-primary)}.editor-btn svg{height:18px;width:18px}.editor-container{background:var(--bg-primary);flex:1;position:relative}.preview-area{background:var(--bg-secondary);display:flex;flex:1;flex-direction:column}.preview-header{align-items:center;background:var(--bg-tertiary);border-bottom:1px solid var(--border-color);display:flex;justify-content:space-between;padding:.75rem 1rem}.preview-controls{gap:1rem}.preview-btn,.preview-controls{align-items:center;display:flex}.preview-btn{background:var(--bg-secondary);border:1px solid var(--border-color);border-radius:var(--border-radius);color:var(--text-secondary);cursor:pointer;height:36px;justify-content:center;transition:all var(--transition-fast);width:36px}.preview-btn:hover{background:var(--bg-surface);border-color:var(--border-hover);color:var(--text-primary)}.preview-btn svg{height:20px;width:20px}.device-selector{background:var(--bg-secondary);border:1px solid var(--border-color);border-radius:var(--border-radius);display:flex;gap:.25rem;padding:.25rem}.device-btn{align-items:center;background:transparent;border:none;border-radius:calc(var(--border-radius) - 2px);color:var(--text-secondary);cursor:pointer;display:flex;height:32px;justify-content:center;transition:all var(--transition-fast);width:32px}.device-btn:hover{color:var(--text-primary)}.device-btn.active{background:var(--primary-color);color:#fff}.device-btn svg{height:18px;width:18px}.preview-frame{align-items:center;background:#f8fafc;display:flex;flex:1;justify-content:center;padding:1rem}.preview-frame.desktop #previewIframe{border-radius:var(--border-radius);height:100%;width:100%}.preview-frame.tablet #previewIframe{border-radius:var(--border-radius-lg);box-shadow:var(--shadow-xl);height:1024px;max-height:100%;max-width:100%;width:768px}.preview-frame.mobile #previewIframe{border-radius:var(--border-radius-xl);box-shadow:var(--shadow-xl);height:667px;max-height:100%;max-width:100%;width:375px}#previewIframe{background:#fff;border:none;height:100%;transition:all var(--transition-normal);width:100%}.input-panel{background:var(--bg-secondary);border-top:1px solid var(--border-color);bottom:0;padding:1rem 1.5rem;position:sticky;z-index:50}.file-attachments{display:flex;flex-wrap:wrap;gap:.5rem;margin:0 auto 1rem;max-width:800px}.file-attachment{align-items:center;background:var(--bg-tertiary);border:1px solid var(--border-color);border-radius:var(--border-radius);color:var(--text-secondary);display:flex;font-size:.875rem;gap:.5rem;padding:.5rem .75rem}.file-attachment img{border-radius:4px;height:24px;-o-object-fit:cover;object-fit:cover;width:24px}.file-attachment-remove{align-items:center;background:var(--bg-surface);border:none;border-radius:50%;color:var(--text-muted);cursor:pointer;display:flex;font-size:12px;height:20px;justify-content:center;line-height:1;transition:all var(--transition-fast);width:20px}.file-attachment-remove:hover{background:var(--error-color);color:#fff}.audio-visualizer{background:var(--bg-tertiary);border:1px solid var(--border-color);border-radius:var(--border-radius-lg);margin:0 auto 1rem;max-width:800px;padding:1rem;position:relative}#visualizerCanvas{background:var(--bg-primary);border-radius:var(--border-radius);height:60px;width:100%}.recording-status{align-items:center;display:flex;gap:1rem;margin-top:.1rem}.recording-preview{flex-grow:1}.recording-indicator,.recording-preview{color:var(--text-secondary);font-size:.875rem}.recording-indicator{align-items:center;display:flex;gap:.5rem}.pulse{animation:pulse 1.5s ease-in-out infinite;background:var(--error-color);border-radius:50%;height:8px;width:8px}@keyframes pulse{0%,to{opacity:1;transform:scale(1)}50%{opacity:.5;transform:scale(1.2)}}.input-container{margin:0 auto;max-width:800px}.input-wrapper{align-items:flex-end;background:var(--bg-primary);border:1px solid var(--border-color);border-radius:var(--border-radius-lg);display:flex;gap:.75rem;padding:.75rem;position:relative;transition:all var(--transition-fast)}.input-wrapper:focus-within{border-color:var(--primary-color);box-shadow:0 0 0 3px rgba(59,130,246,.1)}.message-input{background:transparent;border:none;color:var(--text-primary);flex:1;font-family:inherit;font-size:1rem;line-height:1.5;min-height:80px;resize:none}.message-input::-moz-placeholder{color:var(--text-muted)}.message-input::placeholder{color:var(--text-muted)}.message-input:focus{outline:none}.input-wrapper.tall .message-input{margin-bottom:40px}.input-actions{gap:.5rem;position:absolute;right:10px}.input-actions,.input-btn{align-items:center;display:flex}.input-btn{background:var(--bg-tertiary);border:none;border-radius:var(--border-radius);color:var(--text-secondary);cursor:pointer;height:40px;justify-content:center;transition:all var(--transition-fast);width:40px}.input-btn:hover{background:var(--bg-surface);color:var(--text-primary)}.input-btn.primary{background:var(--primary-color);color:#fff}.input-btn.primary:hover{background:var(--primary-hover)}.input-btn.active{background:var(--error-color);color:#fff}.input-btn svg{height:20px;width:20px}.loading-overlay{align-items:center;-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);background:rgba(15,23,42,.9);display:flex;inset:0;justify-content:center;position:fixed;z-index:200}.loading-content{background:var(--bg-secondary);border:1px solid var(--border-color);border-radius:var(--border-radius-xl);max-width:400px;padding:3rem;text-align:center;width:90%}.spinner{animation:spin 1s linear infinite;border-top:4px solid var(--bg-surface);border:4px solid var(--bg-surface);border-radius:50%;border-top-color:var(--primary-color);height:60px;margin:0 auto 1.5rem;width:60px}@keyframes spin{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}.loading-text{color:var(--text-primary);font-size:1.125rem;font-weight:600;margin-bottom:2rem}.loading-progress{display:flex;flex-direction:column;gap:1rem}.progress-bar{background:var(--bg-surface);border-radius:4px;height:8px;overflow:hidden}.progress-fill{animation:shimmer 2s ease-in-out infinite;background:linear-gradient(90deg,var(--primary-color),var(--primary-hover));height:100%;transition:width var(--transition-slow);width:0}@keyframes shimmer{0%{transform:translateX(-100%)}to{transform:translateX(100%)}}.progress-steps{color:var(--text-muted);display:flex;font-size:.875rem;justify-content:space-between}.progress-steps .step.active{color:var(--primary-color);font-weight:500}.toast{max-width:500px;min-width:320px;position:fixed;right:95%;top:1rem;transform:translateX(100%);transition:transform var(--transition-normal);z-index:300}.toast.show{transform:translateX(0)}.toast-content{align-items:center;background:var(--bg-secondary);border:1px solid var(--border-color);border-radius:var(--border-radius-lg);box-shadow:var(--shadow-xl);display:flex;gap:.75rem;padding:1rem 1.25rem}.success-toast .toast-content{background:rgba(16,185,129,.8);border-color:var(--success-color)}.error-toast .toast-content{background:rgba(239,68,68,.8);border-color:var(--error-color)}.toast-icon{flex-shrink:0;height:24px;width:24px}.success-toast .toast-icon{color:var(--success-color)}.error-toast .toast-icon{color:var(--error-color)}.toast-message{color:var(--text-primary);flex:1;font-size:.875rem;font-weight:500}.toast-close{align-items:center;background:none;border:none;border-radius:4px;color:var(--text-muted);cursor:pointer;display:flex;font-size:1.25rem;height:24px;justify-content:center;line-height:1;transition:all var(--transition-fast);width:24px}.toast-close:hover{background:var(--bg-surface);color:var(--text-primary)}.error-message{color:var(--error-color);font-size:.875rem;margin-top:.5rem;text-align:center}.error-message svg{fill:var(--error-color);height:20px;margin-right:.25rem;width:20px}.error-message span{display:inline-block;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}@media (max-width:768px){.toolbar{padding:.5rem 1rem}.toolbar-btn span{display:none}.toolbar-btn{min-width:40px;padding:.5rem}.sidebar{width:100%}.welcome-content h1{font-size:2rem}.welcome-content p{font-size:1rem}.action-grid{grid-template-columns:repeat(2,1fr)}.project-cards{grid-template-columns:1fr}.input-panel{padding:1rem}.device-selector{display:none}.preview-controls{gap:.5rem}.loading-content{padding:2rem}.editor-header{padding:.5rem 1rem}}@media (max-width:480px){.toolbar-actions{gap:.25rem}.toolbar-btn{min-width:36px;padding:.375rem}.action-grid{grid-template-columns:1fr}.input-wrapper{gap:.5rem;padding:.5rem}.input-btn{height:36px;width:36px}.loading-content{padding:1.5rem}}@media (prefers-color-scheme:dark){.preview-frame{background:var(--bg-primary)}#previewIframe{box-shadow:0 0 0 1px var(--border-color)}}@media (prefers-contrast:high){.editor-btn,.input-btn,.preview-btn,.toolbar-btn{border-width:2px}.file-tab.active{box-shadow:inset 0 -2px 0 var(--primary-color)}}@media (prefers-reduced-motion:reduce){*,:after,:before{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}.spinner{animation:none;border-top-color:var(--primary-color)}.pulse{animation:none;opacity:1}}